Fix crash in SymbolDatabase - errorLogger may be 0

This commit is contained in:
Alexander Mai 2014-04-18 21:19:49 +02:00
parent aecb072fc6
commit 96d2666a6c
1 changed files with 4 additions and 3 deletions

View File

@ -48,6 +48,7 @@ SymbolDatabase::SymbolDatabase(const Tokenizer *tokenizer, const Settings *setti
// find all scopes // find all scopes
for (const Token *tok = _tokenizer->tokens(); tok; tok = tok ? tok->next() : nullptr) { for (const Token *tok = _tokenizer->tokens(); tok; tok = tok ? tok->next() : nullptr) {
// #5593 suggested to add here: // #5593 suggested to add here:
if (_errorLogger)
_errorLogger->reportProgress(_tokenizer->getSourceFilePath(), _errorLogger->reportProgress(_tokenizer->getSourceFilePath(),
"SymbolDatabase", "SymbolDatabase",
tok->progressValue()); tok->progressValue());