Commit b02d705a authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

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
parent dd651204
...@@ -513,8 +513,8 @@ void LookupContext::expandFunction(Function *function, ...@@ -513,8 +513,8 @@ void LookupContext::expandFunction(Function *function,
q->isGlobal()); q->isGlobal());
const QList<Symbol *> candidates = resolveClassOrNamespace(nestedNameSpec, visibleScopes); const QList<Symbol *> candidates = resolveClassOrNamespace(nestedNameSpec, visibleScopes);
for (int j = 0; j < candidates.size(); ++j) { for (int j = 0; j < candidates.size(); ++j) {
expand(candidates.at(j)->asScopedSymbol()->members(), if (ScopedSymbol *scopedSymbol = candidates.at(j)->asScopedSymbol())
visibleScopes, expandedScopes); expand(scopedSymbol->members(), visibleScopes, expandedScopes);
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment