diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 05a0aa0a5..6ae136386 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -1422,7 +1422,8 @@ Scope * Scope::findInNestedListRecursive(const std::string & name) for (it = nestedList.begin(); it != nestedList.end(); ++it) { Scope *child = (*it)->findInNestedListRecursive(name); - return child; + if (child) + return child; } return 0; }