Skip to content
Snippets Groups Projects
Commit c842957a authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Fixes: Possible crash in LookupContext.

parent d5c9141c
No related branches found
No related tags found
No related merge requests found
...@@ -206,7 +206,9 @@ Symbol *Scope::lookat(Identifier *id) const ...@@ -206,7 +206,9 @@ Symbol *Scope::lookat(Identifier *id) const
Symbol *symbol = _hash[h]; Symbol *symbol = _hash[h];
for (; symbol; symbol = symbol->_next) { for (; symbol; symbol = symbol->_next) {
Name *identity = symbol->identity(); Name *identity = symbol->identity();
if (NameId *nameId = identity->asNameId()) { if (! identity) {
continue;
} else if (NameId *nameId = identity->asNameId()) {
if (nameId->identifier()->isEqualTo(id)) if (nameId->identifier()->isEqualTo(id))
break; break;
} else if (TemplateNameId *t = identity->asTemplateNameId()) { } else if (TemplateNameId *t = identity->asTemplateNameId()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment