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
(cherry picked from commit b02d705ac4
)
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user