diff options
author | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2009-11-26 16:22:03 +0100 |
---|---|---|
committer | con <qtc-committer@nokia.com> | 2009-11-26 16:38:57 +0100 |
commit | 3defa2817417b4268ee7febd70e9f9e6a756c08f (patch) | |
tree | f4b2fd6f4a85d2ff2eda9290c7c0f09d79deb62d | |
parent | b351cc97953e8a1713bef53be36cab6199a7614b (diff) |
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 b02d705ac4f4fb256c3d92340720e4fb972ba0f9)
-rw-r--r-- | src/libs/cplusplus/LookupContext.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp index 4d3ed93275..507a5d99aa 100644 --- a/src/libs/cplusplus/LookupContext.cpp +++ b/src/libs/cplusplus/LookupContext.cpp @@ -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); } } } |