From ea67086da48c1fb125f800e26d5657535ba0f06c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 18 Apr 2017 19:57:49 +0200 Subject: [PATCH] Misra: Fix crash in rule 10.6 for bad AST --- addons/misra.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/misra.py b/addons/misra.py index 78ee1d080..e177d397e 100644 --- a/addons/misra.py +++ b/addons/misra.py @@ -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