From 5e6ce7826acad977ea65b91031545980f3705baf Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Tue, 11 Apr 2023 16:51:20 +0200 Subject: [PATCH] Prevent errors in the Inspector when looking for script icons --- editor/editor_inspector.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 87c4dabd8d0..a288ace0708 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -2758,26 +2758,30 @@ void EditorInspector::update_tree() { doc_name = p.name; // Use category's owner script to update some of its information. - if (!EditorNode::get_editor_data().is_type_recognized(type) && p.hint_string.length() && FileAccess::exists(p.hint_string)) { - StringName script_name; - + if (!EditorNode::get_editor_data().is_type_recognized(type) && p.hint_string.length() && ResourceLoader::exists(p.hint_string)) { Ref