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

(cherry picked from commit 0d41f8fb00)
This commit is contained in:
Juan Linietsky 2019-04-15 00:02:17 -03:00 committed by Hein-Pieter van Braam-Stewart
parent 71753edeae
commit 5e02d6d98a
1 changed files with 2 additions and 0 deletions

View File

@ -2466,6 +2466,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);
@ -2474,6 +2475,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);
}
}