From 82523b3d3baa635bf48f2b6da3fba5dd9e4d3a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C4=83t=C4=83lin=20R=C4=83ceanu?= Date: Wed, 27 Feb 2019 01:39:14 +0200 Subject: [PATCH] Do not initialize base class variable and do not leak old allocation --- src/qt/window.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qt/window.cpp b/src/qt/window.cpp index 07bff82592..81ee557427 100644 --- a/src/qt/window.cpp +++ b/src/qt/window.cpp @@ -221,8 +221,6 @@ void wxWindowQt::Init() #endif m_qtWindow = NULL; m_qtContainer = NULL; - - m_dropTarget = NULL; } wxWindowQt::wxWindowQt() @@ -695,6 +693,7 @@ void wxWindowQt::SetDropTarget( wxDropTarget *dropTarget ) if ( m_dropTarget != NULL ) { m_dropTarget->Disconnect(); + delete m_dropTarget; } m_dropTarget = dropTarget;