瀏覽代碼

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

Andrea Catania 5 年之前
父節點
當前提交
c9b86d54bf
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      editor/animation_track_editor.cpp

+ 3 - 0
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);