From 023740e4cb55b248e6087c6d96e62d5ced9dc0b7 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 24 Jul 2018 15:46:54 +0200 Subject: [PATCH] fix cnfvar crash on end inside child vars The recursive call to parse_cnf_children() may also return None if it hit EOF. --- src/cnfvar.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/cnfvar.py b/src/cnfvar.py index 7ab5d93..483a96f 100644 --- a/src/cnfvar.py +++ b/src/cnfvar.py @@ -485,6 +485,8 @@ def parse_cnf_children(state, parent): # parent is further down in hierarchy -> new level (state, children, new_parent) = \ parse_cnf_children (state, new_parent) + if state is None: + break cnf_line["children"] = children current = get(state) new_parent = get_parent(current) -- 1.7.1