浏览代码

Merge pull request #27388 from KidRigger/master

Prevents crash on loading unrecognized resources.
Rémi Verschelde 6 年之前
父节点
当前提交
167d02ef61
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      editor/editor_properties.cpp

+ 2 - 0
editor/editor_properties.cpp

@@ -1982,6 +1982,8 @@ void EditorPropertyResource::_file_selected(const String &p_path) {
 
 
 	RES res = ResourceLoader::load(p_path);
 	RES res = ResourceLoader::load(p_path);
 
 
+	ERR_FAIL_COND(res.is_null());
+
 	List<PropertyInfo> prop_list;
 	List<PropertyInfo> prop_list;
 	get_edited_object()->get_property_list(&prop_list);
 	get_edited_object()->get_property_list(&prop_list);
 	String property_types;
 	String property_types;