From 91af714d39170a502d3691eb6beeeb760e19a0a6 Mon Sep 17 00:00:00 2001 From: volzhs Date: Mon, 31 Oct 2016 11:50:34 +0900 Subject: [PATCH] Fix memory leak with drag & drop on 2D viewport (cherry picked from commit a7d492eb53489083181682839c6d7f83a888ad46) --- tools/editor/plugins/canvas_item_editor_plugin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index 8597a6bf9fa..87e7696d6a1 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -3746,6 +3746,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; } }