Commit 5721847a authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

C++: Fix possible null-pointer access.



Change-Id: Id42bb1cbf109cac8ab868ab7381a54d6be9a7697
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 6382ae65
......@@ -906,6 +906,8 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas
TypedefsResolver typedefsResolver(_context);
foreach (const LookupItem &r, baseResults) {
if (!r.type().type())
continue;
FullySpecifiedType ty = r.type().simplified();
FullySpecifiedType originalType = ty;
Scope *scope = r.scope();
......
......@@ -1211,7 +1211,7 @@ bool CheckSymbols::maybeAddField(const QList<LookupItem> &candidates, NameAST *a
return false;
else if (! (c->enclosingScope() && c->enclosingScope()->isClass()))
return false; // shadowed
else if (c->isTypedef() || c->type()->isFunctionType())
else if (c->isTypedef() || (c->type() && c->type()->isFunctionType()))
return false; // shadowed
unsigned line, column;
......
Supports Markdown
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