Browse Source

Merge pull request #104830 from chocola-mint/fix-#104822

Add null check for SpriteFramesEditor's SpriteFrames
Thaddeus Crews 4 months ago
parent
commit
c374ce211c
1 changed files with 8 additions and 0 deletions
  1. 8 0
      editor/plugins/sprite_frames_editor_plugin.cpp

+ 8 - 0
editor/plugins/sprite_frames_editor_plugin.cpp

@@ -1294,6 +1294,10 @@ void SpriteFramesEditor::_animation_speed_resized() {
 }
 }
 
 
 void SpriteFramesEditor::_animation_speed_changed(double p_value) {
 void SpriteFramesEditor::_animation_speed_changed(double p_value) {
+	if (frames.is_null()) {
+		return;
+	}
+
 	if (updating) {
 	if (updating) {
 		return;
 		return;
 	}
 	}
@@ -1374,6 +1378,10 @@ void SpriteFramesEditor::_frame_list_item_selected(int p_index, bool p_selected)
 }
 }
 
 
 void SpriteFramesEditor::_frame_duration_changed(double p_value) {
 void SpriteFramesEditor::_frame_duration_changed(double p_value) {
+	if (frames.is_null()) {
+		return;
+	}
+
 	if (updating) {
 	if (updating) {
 		return;
 		return;
 	}
 	}