summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2013-08-22 12:13:07 +0200
committerNikolai Kosjar <nikolai.kosjar@digia.com>2013-08-23 11:27:09 +0200
commit54a12ebb797fa6c6805dc9d7a102b8f0339243a6 (patch)
treec031ad2f0199ffa01fd72166db87826e37b6780a /src
parent6ac27c963512161088fe063e2e12d8ab461c45b1 (diff)
downloadqt-creator-54a12ebb797fa6c6805dc9d7a102b8f0339243a6.tar.gz
C++: Fix crash in LookupContext::lookupType()
Task-number: QTCREATORBUG-10019 Change-Id: I7970c2f1ea3044e11250b8dbaf9b29ba3e7f34ef Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/libs/cplusplus/LookupContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp
index 603c327851..2947d6f8fa 100644
--- a/src/libs/cplusplus/LookupContext.cpp
+++ b/src/libs/cplusplus/LookupContext.cpp
@@ -308,7 +308,7 @@ ClassOrNamespace *LookupContext::lookupType(const Name *name, Scope *scope,
ClassOrNamespace* enclosingTemplateInstantiation,
QSet<const Declaration *> typedefsBeingResolved) const
{
- if (! scope) {
+ if (! scope || ! name) {
return 0;
} else if (Block *block = scope->asBlock()) {
for (unsigned i = 0; i < block->memberCount(); ++i) {