Bläddra i källkod

Animation Editor: Fix trying to stop playback without player.

Fixes #9280
Andreas Haas 8 år sedan
förälder
incheckning
bb9daaccff
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      editor/plugins/animation_player_editor_plugin.cpp

+ 4 - 0
editor/plugins/animation_player_editor_plugin.cpp

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