diff --git a/addons/misra.py b/addons/misra.py index cd696c094..e6c62c2b5 100755 --- a/addons/misra.py +++ b/addons/misra.py @@ -1471,7 +1471,7 @@ class MisraChecker: for _ in range(count): rawToken = rawToken.next # Skip comments - while rawTokens and (rawToken.str.startswith('/*') or rawToken.str.startswith('//')): + while rawToken and (rawToken.str.startswith('/*') or rawToken.str.startswith('//')): rawToken = rawToken.next if rawToken is None: break