Misra: Fix crash in rule 10.6 for bad AST

This commit is contained in:
Daniel Marjamäki 2017-04-18 19:57:49 +02:00
parent f707eceb20
commit ea67086da4
1 changed files with 1 additions and 1 deletions

View File

@ -381,7 +381,7 @@ def misra_10_4(data):
def misra_10_6(data):
for token in data.tokenlist:
if token.str != '=':
if token.str != '=' or not token.astOperand1 or not token.astOperand2:
continue
vt1 = token.astOperand1.valueType
vt2 = token.astOperand2.valueType