Преглед изворни кода

:beetle: Fix runtime error

It's likely that's this signal can be sent when the node gets out of
tree.
DricomDragon пре 1 година
родитељ
комит
b60db1aac7
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      godot/component/ui/victory/victory_menu.gd

+ 3 - 1
godot/component/ui/victory/victory_menu.gd

@@ -19,7 +19,9 @@ func _on_quit_button_pressed():
 	get_tree().quit()
 
 
-func _on_visibility_changed():
+func _on_visibility_changed() -> void:
+	if !is_inside_tree():
+		return
 	set_process_input(true)
 	%TitleButton.grab_focus()