summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorWilson E. Alvarez <wilson.e.alvarez1@gmail.com>2017-08-24 12:51:28 -0400
committerWilson E. Alvarez <wilson.e.alvarez1@gmail.com>2017-08-25 08:47:05 -0400
commit1577f4165374fc7c6d7f3031e463f0aab6e96faa (patch)
tree82bae3af4e17409446b8f11d69ee1bd0c61fcb36 /editor/plugins
parent3ea0943f645e5fda0b1bb68415e9c92ed4cf97dd (diff)
Fixed several memory leaks
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp4
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 79bf68b061..b5c237a61c 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -4114,3 +4114,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
label_desc->hide();
editor->get_gui_base()->add_child(label_desc);
}
+
+CanvasItemEditorViewport::~CanvasItemEditorViewport() {
+ memdelete(preview);
+}
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 9b027fda60..0291660d42 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -512,6 +512,7 @@ public:
virtual void drop_data(const Point2 &p_point, const Variant &p_data);
CanvasItemEditorViewport(EditorNode *p_node, CanvasItemEditor *p_canvas);
+ ~CanvasItemEditorViewport();
};
#endif