From c8bc33d5b5c97e0b4d794b776f9831af2d15b7af Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 27 Sep 2001 02:04:19 +0000 Subject: [PATCH] If a shape has client data, it deletes it when the shape is deleted. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/ogl/basic.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/src/ogl/basic.cpp b/contrib/src/ogl/basic.cpp index dc37563099..0a85bbb517 100644 --- a/contrib/src/ogl/basic.cpp +++ b/contrib/src/ogl/basic.cpp @@ -338,6 +338,11 @@ wxShape::~wxShape() if (m_canvas) m_canvas->RemoveShape(this); + if (m_clientData) { + delete m_clientData; + m_clientData = NULL; + } + GetEventHandler()->OnDelete(); }