Explorar o código

Animation Editor: Fix trying to stop playback without player.

Fixes #9280

(cherry picked from commit bb9daaccfff193b9b20ff0679baef716fc6ee892)
Andreas Haas %!s(int64=8) %!d(string=hai) anos
pai
achega
3d95424147
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      editor/plugins/animation_player_editor_plugin.cpp

+ 4 - 0
editor/plugins/animation_player_editor_plugin.cpp

@@ -255,6 +255,10 @@ void AnimationPlayerEditor::_play_bw_from_pressed() {
 }
 void AnimationPlayerEditor::_stop_pressed() {
 
+	if (!player) {
+		return;
+	}
+
 	player->stop(false);
 	play->set_pressed(false);
 	stop->set_pressed(true);