diff --git a/src/singletons/global_state.gd b/src/singletons/global_state.gd index 0defc1d..298009f 100644 --- a/src/singletons/global_state.gd +++ b/src/singletons/global_state.gd @@ -43,7 +43,10 @@ func leave_stage(actor:Object, dropObject: bool = false) -> bool: stage_list.erase(actor) - stage_list.front().has_stage = true + if stage_list != []: + stage_list.front().has_stage = true + else: + get_tree().quit() return false