Skip to content

Commit e3a6527

Browse files
ImkoMarijnissenmaartenflippo
authored andcommitted
fix: don't debug propagate deleted nogoods (#147)
The debug propagate currently also attempts to propagate deleted nogoods
1 parent bba1abb commit e3a6527

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pumpkin-solver/src/propagators/nogoods/nogood_propagator.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,6 +1328,13 @@ impl NogoodPropagator {
13281328
// This is an inefficient implementation for testing purposes
13291329
let nogood = &self.nogoods[nogood_id];
13301330

1331+
if nogood.is_deleted {
1332+
// The nogood has already been deleted, meaning that it could be that the call to
1333+
// `propagate` would not find any propagations using it due to the watchers being
1334+
// deleted
1335+
return Ok(());
1336+
}
1337+
13311338
// First we get the number of falsified predicates
13321339
let has_falsified_predicate = nogood
13331340
.predicates

0 commit comments

Comments
 (0)