]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/window.cpp
Added workaround for life crashing in toolbar deletion.
[wxWidgets.git] / src / motif / window.cpp
index e73c756d2eeb9d99fda45b2fac2969d9ddb5c5f7..4ec50c783906d6989e9fadaaf826ad121dc650f6 100644 (file)
@@ -420,14 +420,19 @@ wxWindow::~wxWindow()
         if (m_hScrollBar)
         {
             wxDeleteWindowFromTable((Widget) m_hScrollBar);
+           XtUnmanageChild((Widget) m_hScrollBar);
         }
         if (m_vScrollBar)
         {
             wxDeleteWindowFromTable((Widget) m_vScrollBar);
+           XtUnmanageChild((Widget) m_vScrollBar);
         }
 
-        UnmanageAndDestroy(m_hScrollBar);
-        UnmanageAndDestroy(m_vScrollBar);
+        if (m_hScrollBar)
+           XtDestroyWidget((Widget) m_hScrollBar);
+        if (m_vScrollBar)
+           XtDestroyWidget((Widget) m_vScrollBar);
+
         UnmanageAndDestroy(m_scrolledWindow);
 
         if (m_borderWidget)