Fixed possible crash when asking for the icon of a top-level symbol (e.g. the global namespace).

This commit is contained in:
Roberto Raggi
2010-03-09 14:28:23 +01:00
parent c5df0a1d0d
commit 1c8930737c

View File

@@ -84,7 +84,7 @@ QIcon Icons::iconForSymbol(const Symbol *symbol) const
} else if (symbol->isPrivate()) {
return _funcPrivateIcon;
}
} else if (symbol->scope()->isEnumScope()) {
} else if (symbol->scope() && symbol->scope()->isEnumScope()) {
return _enumeratorIcon;
} else if (symbol->isDeclaration() || symbol->isArgument()) {
if (symbol->isPublic()) {