summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorAnish <anishbhobe@hotmail.com>2019-03-25 02:27:02 +0530
committerAnish <anishbhobe@hotmail.com>2019-03-25 02:32:21 +0530
commit8ee31ace34b3cd542fca2fe1b008d85ad20378ba (patch)
treee8a302734e1f6dc600ddd49e8651be6215b01be6 /editor
parente45393482463ddb606bab4f2a78f4a5024cdce7a (diff)
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
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_properties.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index d7faa44441..2d0d212af9 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -1982,6 +1982,8 @@ void EditorPropertyResource::_file_selected(const String &p_path) {
RES res = ResourceLoader::load(p_path);
+ ERR_FAIL_COND(res.is_null());
+
List<PropertyInfo> prop_list;
get_edited_object()->get_property_list(&prop_list);
String property_types;