~stacyharper/bonsai

b5093b52e2a45f89ebbe336833b55bce6e1a5f8f — Stacy Harper 4 months ago 7983d10
Avoid chain loop if the tree is empty
1 files changed, 3 insertions(+), 1 deletions(-)

M bonsai/tree/voyager.ha
M bonsai/tree/voyager.ha => bonsai/tree/voyager.ha +3 -1
@@ 161,7 161,9 @@ fn run_branch_delay(voyager: *voyager, branch: branch_delay) void = {
};

fn voyager_restart(voyager: *voyager) bool = {
	if (len(voyager.available_branches) == 0) {
	if (len(voyager.available_branches) == 0
		&& len(voyager.tree) != 0
	) {
		voyager.available_branches = voyager.tree;
		return true;
	};