aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/create_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/create_dialog.cpp')
-rw-r--r--tools/editor/create_dialog.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/editor/create_dialog.cpp b/tools/editor/create_dialog.cpp
index 313b1ad18..1b1d5f3a4 100644
--- a/tools/editor/create_dialog.cpp
+++ b/tools/editor/create_dialog.cpp
@@ -400,8 +400,11 @@ Object *CreateDialog::instance_selected() {
if (selected) {
- String custom = selected->get_metadata(0);
+ Variant md = selected->get_metadata(0);
+ String custom;
+ if (md.get_type()!=Variant::NIL)
+ custom=md;
if (custom!=String()) {
if (EditorNode::get_editor_data().get_custom_types().has(custom)) {