Fix issue found by Coverity, scope cant be null since scope is dereferenced on all paths before the while and also unconditionally inside while

This commit is contained in:
Daniel Marjamäki 2017-08-02 08:17:29 +02:00
parent 462ae455c8
commit 32422c815b
1 changed files with 1 additions and 1 deletions

View File

@ -3690,7 +3690,7 @@ const Enumerator * SymbolDatabase::findEnumerator(const Token * tok) const
} }
} }
while (scope && scope->nestedIn) { while (scope->nestedIn) {
if (scope->type == Scope::eFunction && scope->functionOf) if (scope->type == Scope::eFunction && scope->functionOf)
scope = scope->functionOf; scope = scope->functionOf;
else else