Prevents crash on loading unrecognized resources.
Editor crashes on trying to load resources with no loaders.
Simple check on the resource loader prevents using a null
resource loader.
Fixes: #27385
(cherry picked from commit 8ee31ace34
)
This commit is contained in:
parent
1d05568aed
commit
f4578e1008
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue