Fix Cppcheck warning nullPointerRedundantCheck

This commit is contained in:
Daniel Marjamäki 2020-12-15 07:11:13 +01:00
parent 82635417d2
commit ecfabbcdbb
1 changed files with 1 additions and 1 deletions

View File

@ -891,7 +891,7 @@ ExprEngine::ArrayValue::ArrayValue(DataBase *data, const Variable *var)
size.push_back(std::make_shared<ExprEngine::IntRange>(data->getNewSymbolName(), 1, ExprEngine::ArrayValue::MAXSIZE));
}
const Token *initToken = var->nameToken();
const Token *initToken = var ? var->nameToken() : nullptr;
while (initToken && initToken->str() != "=")
initToken = initToken->astParent();