1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

Fixed editor crash when the animation player has no root assigned.

(cherry picked from commit c9b86d54bf)
This commit is contained in:
Andrea Catania
2020-02-26 14:50:22 +01:00
committed by Rémi Verschelde
parent 6e4aa5a580
commit 30688769f4

View File

@@ -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 { bool AnimationTrackEdit::_is_value_key_valid(const Variant &p_key_value, Variant::Type &r_valid_type) const {
if (root == nullptr)
return false;
RES res; RES res;
Vector<StringName> leftover_path; Vector<StringName> leftover_path;
Node *node = root->get_node_and_resource(animation->track_get_path(track), res, leftover_path); Node *node = root->get_node_and_resource(animation->track_get_path(track), res, leftover_path);