diff options
author | Poommetee Ketson <poommetee@protonmail.com> | 2018-04-09 00:23:42 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-09 00:23:42 +0700 |
commit | 9acc199bf87db512ea330d62dabacda4f31de6ff (patch) | |
tree | 40584f00303b1cbefeee2b7f824e56aa1eb50792 | |
parent | 2f4f8de459f8b45a3a80018753f0fa24dc138809 (diff) | |
parent | 56a6d90f36f2b20f537ebb4d8f8b71696e6137cc (diff) |
Merge pull request #18061 from Chaosus/fixbug
Fix crash when click on any inspector entry that takes Resource
-rw-r--r-- | editor/property_editor.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index e1ee32fb4f..4bd70d0c29 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -882,7 +882,12 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: } else if (hint_text != "") { int idx = 0; - const Vector<EditorData::CustomType> custom_resources = EditorNode::get_editor_data().get_custom_types()["Resource"]; + Vector<EditorData::CustomType> custom_resources; + + if (EditorNode::get_editor_data().get_custom_types().has("Resource")) { + custom_resources = EditorNode::get_editor_data().get_custom_types()["Resource"]; + } + for (int i = 0; i < hint_text.get_slice_count(","); i++) { String base = hint_text.get_slice(",", i); |