summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2019-05-25 15:30:53 -0300
committerMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2019-05-25 15:30:53 -0300
commit757a1de58d06c088edf2f23b3c7cfd1632c2ba91 (patch)
treec46dfdfb474a422eb4e3a8d50e205555b4704246
parent5c1cce6e3f7d9679152762506ffafcb29e3f72c9 (diff)
Fix "Node not found:" error message when adding tracks
-rw-r--r--editor/animation_track_editor.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 1985c91f31..0eec01f2cb 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -63,8 +63,6 @@ public:
ClassDB::bind_method("_dont_undo_redo", &AnimationTrackKeyEdit::_dont_undo_redo);
}
- //PopupDialog *ke_dialog;
-
void _fix_node_path(Variant &value) {
NodePath np = value;
@@ -3456,7 +3454,7 @@ void AnimationTrackEditor::_update_tracks() {
Ref<Texture> icon = get_icon("Node", "EditorIcons");
String name = base_path;
String tooltip;
- if (root) {
+ if (root && root->has_node(base_path)) {
Node *n = root->get_node(base_path);
if (n) {
if (has_icon(n->get_class(), "EditorIcons")) {