diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-26 19:07:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-26 19:07:05 +0100 |
commit | bd4497db75db2e09c77b90c219f5e9006756efac (patch) | |
tree | 2c9d457e7e7ef846766d50cc4e8c800a8c0e881b /editor/animation_track_editor.cpp | |
parent | be4a516b77a07d9c554c31b8a348e1d5c7a04648 (diff) | |
parent | c9b86d54bfd762305ac48232f4a7f98c126fc37e (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.cpp | 3 |
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); |