fixed segmentation fault in case typeStartToken() returns 0

This commit is contained in:
Daniel Marjamäki 2014-03-29 21:01:21 +01:00
parent efc84ac310
commit 348c26f59c
1 changed files with 2 additions and 1 deletions

View File

@ -3318,7 +3318,8 @@ void CheckOther::checkNegativeBitwiseShift()
continue;
if (!rhs->isNumber() && !rhs->variable())
continue;
if (rhs->variable() && !rhs->variable()->typeStartToken()->isStandardType())
if (rhs->variable() &&
(!rhs->variable()->typeStartToken() || !rhs->variable()->typeStartToken()->isStandardType()))
continue;
}