Explorar o código

fixed problem with crashing godot when changing number of steps while no animation added

krzycho %!s(int64=10) %!d(string=hai) anos
pai
achega
2287d030a2
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      tools/editor/animation_editor.cpp

+ 2 - 1
tools/editor/animation_editor.cpp

@@ -3319,7 +3319,8 @@ void AnimationKeyEditor::_insert_delay() {
 void AnimationKeyEditor::_step_changed(float p_len) {
 void AnimationKeyEditor::_step_changed(float p_len) {
 
 
 	updating=true;
 	updating=true;
-	animation->set_step(p_len);
+	if (!animation.is_null())
+		animation->set_step(p_len);
 	updating=false;
 	updating=false;
 }
 }