diff options
author | Andrea Catania <info@andreacatania.com> | 2020-02-26 14:50:22 +0100 |
---|---|---|
committer | Andrea Catania <info@andreacatania.com> | 2020-02-26 14:50:22 +0100 |
commit | c9b86d54bfd762305ac48232f4a7f98c126fc37e (patch) | |
tree | 5a30e6b68e426e7f8928b02ee3b7a12420af8711 /editor | |
parent | 1e57b558f215dd4920768e9567b6f55825877c89 (diff) |
Fixed editor crash when the animation player has no root assigned.
Diffstat (limited to 'editor')
-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); |