Skip to content

Commit 4d8ea01

Browse files
committed
Fix state sequence algorithm edge case
Credits to @vanh00f
1 parent b86ddd9 commit 4d8ea01

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

bughog/search_strategy/bgb_search.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ def __get_next_pair_to_split(self) -> Optional[tuple[State, State]]:
8686
# Remove the first and last pair if they have a first and last state without a result, respectively
8787
if pairs[0][0].result_variables is None:
8888
pairs = pairs[1:]
89+
if not pairs:
90+
return None
8991
if pairs[-1][1].result_variables is None:
9092
pairs = pairs[:-1]
9193
# Remove all pairs that have already been identified as unavailability gaps

0 commit comments

Comments
 (0)