refocus_tree: clear arena on no root
This commit is contained in:
parent
ff7cf6cb0d
commit
1ebfeb9f65
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user