forked from qt-creator/qt-creator
Fixed possible crash in the code completion
Null pointer reference in a case where the global namespace is explicitly specified using :: Task-number: QTCREATORBUG-351 Review-pending-by: Roberto Raggi
This commit is contained in:
@@ -513,8 +513,8 @@ void LookupContext::expandFunction(Function *function,
|
||||
q->isGlobal());
|
||||
const QList<Symbol *> candidates = resolveClassOrNamespace(nestedNameSpec, visibleScopes);
|
||||
for (int j = 0; j < candidates.size(); ++j) {
|
||||
expand(candidates.at(j)->asScopedSymbol()->members(),
|
||||
visibleScopes, expandedScopes);
|
||||
if (ScopedSymbol *scopedSymbol = candidates.at(j)->asScopedSymbol())
|
||||
expand(scopedSymbol->members(), visibleScopes, expandedScopes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user