Fix Leak with Gradient in Node3DEditorViewport

This commit is contained in:
Rafał Mikrut 2021-01-04 10:06:46 +01:00
parent ec99c8159d
commit 8e7cbf315e
2 changed files with 5 additions and 0 deletions

View File

@ -4141,6 +4141,10 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito
EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &Node3DEditorViewport::update_transform_gizmo_view));
}
Node3DEditorViewport::~Node3DEditorViewport() {
memdelete(frame_time_gradient);
}
//////////////////////////////////////////////////////////////
void Node3DEditorViewportContainer::_gui_input(const Ref<InputEvent> &p_event) {

View File

@ -483,6 +483,7 @@ public:
Camera3D *get_camera() { return camera; } // return the default camera object.
Node3DEditorViewport(Node3DEditor *p_spatial_editor, EditorNode *p_editor, int p_index);
~Node3DEditorViewport();
};
class Node3DEditorSelectedItem : public Object {