From 4b4f201b79378688e010b403aaec6207ffcf7b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Zmys=C5=82owski?= Date: Thu, 22 Dec 2011 07:28:28 +0100 Subject: [PATCH] Fixed #3437 (segmentation fault of cppcheck) --- lib/symboldatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 67a338408..411a7375f 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -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