diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-06-18 23:30:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-18 23:30:53 +0200 |
commit | 08c6cc668ac98773827d5007783f0b1ac29fd179 (patch) | |
tree | 83ef65a64080751d731cce24a98eb621aff771a2 | |
parent | 41b962fc9c5c4517a1665aa4b0f18d486ac49c6a (diff) | |
parent | b75ad7b6b0761239b5396719b4e90b0b235c2a6a (diff) |
Merge pull request #19631 from guilhermefelipecgs/fix_animation_player_crash
Prevent animation player crash
-rw-r--r-- | editor/animation_track_editor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 6b5dfde0b9..02d667031a 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -4116,7 +4116,7 @@ void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) { track_edits[i]->append_to_selection(local_rect); } - if (_get_track_selected() == -1) { //minimal hack to make shortcuts work + if (_get_track_selected() == -1 && track_edits.size() > 0) { //minimal hack to make shortcuts work track_edits[track_edits.size() - 1]->grab_focus(); } } else { |