diff --git a/src/motif/window.cpp b/src/motif/window.cpp index f251d7492e..9c1ff9d83e 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -408,10 +408,9 @@ wxWindow::~wxWindow() if (w) { XtDestroyWidget(w); + m_drawingArea = (WXWidget) 0; } - m_mainWidget = (WXWidget) 0; - // Only if we're _really_ a canvas (not a dialog box/panel) if (m_scrolledWindow) { @@ -451,7 +450,8 @@ wxWindow::~wxWindow() // wxSCROLL[WIN]_THUMBRELEASE events. Also it was reported // that this call crashed wxMotif under OS/2, so it seems // that leaving it out is the right thing to do. -// XtDestroyWidget((Widget) GetMainWidget()); + // SN, Feb/2000: newgrid/griddemo shows why it is needed :-( + XtDestroyWidget((Widget) GetMainWidget()); SetMainWidget((WXWidget) NULL); } }