summaryrefslogtreecommitdiff
path: root/editor/animation_track_editor.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-26 19:07:05 +0100
committerGitHub <noreply@github.com>2020-02-26 19:07:05 +0100
commitbd4497db75db2e09c77b90c219f5e9006756efac (patch)
tree2c9d457e7e7ef846766d50cc4e8c800a8c0e881b /editor/animation_track_editor.cpp
parentbe4a516b77a07d9c554c31b8a348e1d5c7a04648 (diff)
parentc9b86d54bfd762305ac48232f4a7f98c126fc37e (diff)
Merge pull request #36562 from AndreaCatania/anim_crash_fix
Fixed editor crash when the animation player has no root assigned.
Diffstat (limited to 'editor/animation_track_editor.cpp')
-rw-r--r--editor/animation_track_editor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 9742cadfd3..8758fbcfc9 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -2480,6 +2480,9 @@ void AnimationTrackEdit::_path_entered(const String &p_text) {
bool AnimationTrackEdit::_is_value_key_valid(const Variant &p_key_value, Variant::Type &r_valid_type) const {
+ if (root == nullptr)
+ return false;
+
RES res;
Vector<StringName> leftover_path;
Node *node = root->get_node_and_resource(animation->track_get_path(track), res, leftover_path);