Commit 08c7bf8b authored by Stefan Behnel's avatar Stefan Behnel

minor fix

parent b9603f4d
......@@ -3384,7 +3384,7 @@ class ConstantFolding(Visitor.VisitorTransform, SkipDeclarations):
def visit_WhileStatNode(self, node):
self.visitchildren(node)
if node.condition.has_constant_result():
if node.condition and node.condition.has_constant_result():
if node.condition.constant_result:
node.condition = None
node.else_clause = None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment