refocus_tree: clear arena on no root
This commit is contained in:
@@ -535,6 +535,8 @@ impl FutureMoves {
|
|||||||
/// Rebuilds the Arena based on `self.current_root`, prunes unrelated nodes
|
/// Rebuilds the Arena based on `self.current_root`, prunes unrelated nodes
|
||||||
fn refocus_tree(&mut self) {
|
fn refocus_tree(&mut self) {
|
||||||
let Some(root) = self.current_root else {
|
let Some(root) = self.current_root else {
|
||||||
|
// handle current_root being empty (clear arena and return)
|
||||||
|
self.arena.clear();
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user