Skip to content

Commit

Permalink
Prevents crash on loading unrecognized resources.
Browse files Browse the repository at this point in the history
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 8ee31ac)
  • Loading branch information
kidrigger authored and akien-mga committed Apr 1, 2019
1 parent 1d05568 commit f4578e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor/editor_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f4578e1

Please sign in to comment.