From ba47f15b786de8b6e1ea8a6bb8227e401180966e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 16 Aug 2018 15:40:04 +0200 Subject: Fix crash assigning script to a Resource We were dereferencing the wrong identifier, which could be NULL. Fixes #19289, supersedes and closes #20985. --- editor/editor_properties.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 59798bfab3..0cbd5f0bff 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -2052,7 +2052,7 @@ void EditorPropertyResource::_menu_option(int p_which) { ERR_BREAK(!resp); if (get_edited_object() && base_type != String() && base_type == "Script") { //make visual script the right type - res->call("set_instance_base_type", get_edited_object()->get_class()); + resp->call("set_instance_base_type", get_edited_object()->get_class()); } res = Ref(resp); -- cgit v1.2.3