diff --git a/addons/misra.py b/addons/misra.py index 990059c41fdd..74787f367b4a 100755 --- a/addons/misra.py +++ b/addons/misra.py @@ -4056,7 +4056,7 @@ def misra_22_9(self, cfg): def misra_22_10(self, cfg): last_function_call = None for token in cfg.tokenlist: - if token.isName and token.next.str == '(' and not simpleMatch(token.next.link, ') {'): + if token.isName and token.next and token.next.str == '(' and not simpleMatch(token.next.link, ') {'): name, args = cppcheckdata.get_function_call_name_args(token) last_function_call = name if token.str == '}':