C++: Fix possible null-pointer access.

Change-Id: Id42bb1cbf109cac8ab868ab7381a54d6be9a7697
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Erik Verbruggen
2013-01-29 09:55:34 +01:00
parent 6382ae65b9
commit 5721847a57
2 changed files with 3 additions and 1 deletions

View File

@@ -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;