Symbol database: Avoid possible null pointer dereference if _settings is null. Ticket: #2219

This commit is contained in:
Robert Reif 2010-11-25 17:55:44 +01:00 committed by Daniel Marjamäki
parent 03b12c5494
commit ad91f414db
1 changed files with 1 additions and 1 deletions

View File

@ -1025,7 +1025,7 @@ void SymbolDatabase::SpaceInfo::getVarList()
// If the vartok was set in the if-blocks above, create a entry for this variable..
if (vartok && vartok->str() != "operator")
{
if (vartok->varId() == 0 && check->_settings->debugwarnings)
if (vartok->varId() == 0 && check->_settings && check->_settings->debugwarnings)
{
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
ErrorLogger::ErrorMessage::FileLocation loc;