Avoid crash on changing snap mode when no animation exists, closes #28031

This commit is contained in:
Juan Linietsky 2019-04-15 00:02:17 -03:00
parent caaa492133
commit 0d41f8fb00

View File

@ -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);
}
}