From f4578e1008ee2d2894ad686eb303473e1a0c32e3 Mon Sep 17 00:00:00 2001 From: Anish Date: Mon, 25 Mar 2019 02:27:02 +0530 Subject: [PATCH] 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 8ee31ace34b3cd542fca2fe1b008d85ad20378ba) --- editor/editor_properties.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index d7faa444417..2d0d212af9b 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 prop_list; get_edited_object()->get_property_list(&prop_list); String property_types;