summaryrefslogtreecommitdiffstats
path: root/editor/plugins/animation_player_editor_plugin.cpp
diff options
context:
space:
mode:
authorqarmin <mikrutrafal54@gmail.com>2019-04-04 22:00:16 +0200
committerqarmin <mikrutrafal54@gmail.com>2019-04-04 22:00:16 +0200
commit8460d0678c28816f6f206f40b71de2510fab1ffc (patch)
tree57970414bfd1d51aac751f2c9ec6051ec0fb629e /editor/plugins/animation_player_editor_plugin.cpp
parentc2c11fc063e723c41579e6307e40fd16ac5334c4 (diff)
downloadredot-engine-8460d0678c28816f6f206f40b71de2510fab1ffc.tar.gz
Small fixes to static analyzer bugs
Diffstat (limited to 'editor/plugins/animation_player_editor_plugin.cpp')
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index bbaf41e3cc..f54b130b31 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -841,6 +841,12 @@ void AnimationPlayerEditor::_update_player() {
onion_skinning->set_disabled(player == NULL);
pin->set_disabled(player == NULL);
+ if (!player) {
+ AnimationPlayerEditor::singleton->get_track_editor()->update_keying();
+ EditorNode::get_singleton()->update_keying();
+ return;
+ }
+
int active_idx = -1;
for (List<StringName>::Element *E = animlist.front(); E; E = E->next()) {
@@ -853,12 +859,6 @@ void AnimationPlayerEditor::_update_player() {
active_idx = animation->get_item_count() - 1;
}
- if (!player) {
- AnimationPlayerEditor::singleton->get_track_editor()->update_keying();
- EditorNode::get_singleton()->update_keying();
- return;
- }
-
updating = false;
if (active_idx != -1) {
animation->select(active_idx);