diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 92db0aad1..802c2b308 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1977,7 +1977,7 @@ void CheckOther::checkMisusedScopedObject() if (tok->str() == "{") { ++depth; } else if (tok->str() == "}") { - if (depth == 0) + if (depth <= 1) break; --depth; }