Commit 081e31fc authored by Roberto Raggi's avatar Roberto Raggi

Check for 0x0 pointers.

parent b9c56431
......@@ -1340,15 +1340,18 @@ protected:
scope);
foreach (LookupItem result, results) {
FullySpecifiedType fst = result.type();
if (! result.declaration())
continue;
if (Enum *e = result.declaration()->type()->asEnumType())
return e;
if (NamedType *namedType = fst->asNamedType()) {
QList<LookupItem> candidates =
typeOfExpression.context().lookup(namedType->name(), scope);
foreach (const LookupItem &r, candidates) {
Symbol *candidate = r.declaration();
if (Enum *e = candidate->asEnum()) {
return e;
if (Symbol *candidate = r.declaration()) {
if (Enum *e = candidate->asEnum()) {
return e;
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment