From f0d5fc50ef00f4670e92366ce2da1b37a2fd34e2 Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Thu, 9 Mar 2000 14:58:40 +0000 Subject: [PATCH] Added workaround for life crashing in toolbar deletion. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/motif/window.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/motif/window.cpp b/src/motif/window.cpp index e73c756d2e..4ec50c7839 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -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) -- 2.45.2