Fixed #3437 (segmentation fault of cppcheck)

This commit is contained in:
Marek Zmysłowski 2011-12-22 07:28:28 +01:00 committed by Daniel Marjamäki
parent deccb1df06
commit 4b4f201b79
1 changed files with 1 additions and 1 deletions

View File

@ -1698,7 +1698,7 @@ const Scope *SymbolDatabase::findVariableType(const Scope *start, const Token *t
// do the names match?
if (scope->className == type->str()) {
// check if type does not have a namespace
if (type->previous()->str() != "::") {
if (type->previous() != NULL && type->previous()->str() != "::") {
const Scope *parent = start;
// check if in same namespace