From c842957a8be742c0931efed6c00cab384b3c48c4 Mon Sep 17 00:00:00 2001 From: Roberto Raggi <qtc-committer@nokia.com> Date: Mon, 9 Feb 2009 20:22:00 +0100 Subject: [PATCH] Fixes: Possible crash in LookupContext. --- src/shared/cplusplus/Scope.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shared/cplusplus/Scope.cpp b/src/shared/cplusplus/Scope.cpp index bdca9f8536d..db05d1bdc93 100644 --- a/src/shared/cplusplus/Scope.cpp +++ b/src/shared/cplusplus/Scope.cpp @@ -206,7 +206,9 @@ Symbol *Scope::lookat(Identifier *id) const Symbol *symbol = _hash[h]; for (; symbol; symbol = symbol->_next) { Name *identity = symbol->identity(); - if (NameId *nameId = identity->asNameId()) { + if (! identity) { + continue; + } else if (NameId *nameId = identity->asNameId()) { if (nameId->identifier()->isEqualTo(id)) break; } else if (TemplateNameId *t = identity->asTemplateNameId()) { -- GitLab