summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp
index ac39e0687c..af9fd69ae7 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3797,6 +3797,7 @@ bool CanvasItemEditorViewport::_create_instance(Node* parent, String& path, cons
if (editor->get_edited_scene()->get_filename()!="") { // cyclical instancing
if (_cyclical_dependency_exists(editor->get_edited_scene()->get_filename(), instanced_scene)) {
+ memdelete(instanced_scene);
return false;
}
}