]> git.saurik.com Git - wxWidgets.git/commitdiff
If a shape has client data, it deletes it when the shape is deleted.
authorRobin Dunn <robin@alldunn.com>
Thu, 27 Sep 2001 02:04:19 +0000 (02:04 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 27 Sep 2001 02:04:19 +0000 (02:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/ogl/basic.cpp

index dc375630999fb4026e9034e1107cd1fe6d017a1c..0a85bbb517a4ea9f0129764b456ebbc8d2b6218e 100644 (file)
@@ -338,6 +338,11 @@ wxShape::~wxShape()
   if (m_canvas)
     m_canvas->RemoveShape(this);
 
   if (m_canvas)
     m_canvas->RemoveShape(this);
 
+  if (m_clientData) {
+      delete m_clientData;
+      m_clientData = NULL;
+  }
+
   GetEventHandler()->OnDelete();
 }
 
   GetEventHandler()->OnDelete();
 }