SymbolDatabase: Add null pointer check for ast operand for '(' token

This commit is contained in:
Daniel Marjamäki 2019-10-08 17:53:29 +02:00
parent 506a952ad2
commit 1abf70a7cb
1 changed files with 1 additions and 1 deletions

View File

@ -5559,7 +5559,7 @@ void SymbolDatabase::setValueTypeInTokenList(bool reportDebugWarnings)
// function style cast
else if (tok->previous() && tok->previous()->isStandardType()) {
ValueType valuetype;
if (valuetype.fromLibraryType(tok->astOperand1()->expressionString(), mSettings)) {
if (tok->astOperand1() && valuetype.fromLibraryType(tok->astOperand1()->expressionString(), mSettings)) {
setValueType(tok, valuetype);
continue;
}