]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/toolbar.cpp
Applied patch [ 642157 ] [MSW] HMENU resource leak from wxMenuBar
[wxWidgets.git] / src / motif / toolbar.cpp
index f62b739ad04f07d0afe70b4d83944ccd22d49007..5f920cc7a1270b1780ca0b12b8d62d7b38a9011b 100644 (file)
@@ -164,9 +164,8 @@ wxToolBarTool::~wxToolBarTool()
 {
     if ( m_widget )
         XtDestroyWidget(m_widget);
-    if ( m_pixmap )
-        XmDestroyPixmap(DefaultScreenOfDisplay((Display*)wxGetDisplay()),
-                        m_pixmap);
+    // note: do not delete m_pixmap here because it will be deleted
+    //       by the base class when the bitmap is destroyed.
 }
 
 // ----------------------------------------------------------------------------