diff --git a/src/logic/future_moves.rs b/src/logic/future_moves.rs index fa3efd9..c327ad9 100644 --- a/src/logic/future_moves.rs +++ b/src/logic/future_moves.rs @@ -535,6 +535,8 @@ impl FutureMoves { /// Rebuilds the Arena based on `self.current_root`, prunes unrelated nodes fn refocus_tree(&mut self) { let Some(root) = self.current_root else { + // handle current_root being empty (clear arena and return) + self.arena.clear(); return; };