diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-04-15 00:02:17 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2019-04-15 00:02:17 -0300 |
commit | 0d41f8fb00e72e5c6b3e1186530e5c92761074e6 (patch) | |
tree | f48f3a2ed900099c3b82daf010f84f12b03ece01 | |
parent | caaa492133b4593abc63f6fe1bd850ee03c209d1 (diff) |
Avoid crash on changing snap mode when no animation exists, closes #28031
-rw-r--r-- | editor/animation_track_editor.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 48c90dabef..329787df0a 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -2540,6 +2540,7 @@ void AnimationTrackEditor::set_animation(const Ref<Animation> &p_anim) { step->set_block_signals(false); step->set_read_only(false); snap->set_disabled(false); + snap_mode->set_disabled(true); } else { hscroll->hide(); edit->set_disabled(true); @@ -2548,6 +2549,7 @@ void AnimationTrackEditor::set_animation(const Ref<Animation> &p_anim) { step->set_block_signals(false); step->set_read_only(true); snap->set_disabled(true); + snap_mode->set_disabled(false); } } |