From f6551618d4cb7f5e4868912e19306018f537b11f Mon Sep 17 00:00:00 2001 From: Michael Wetherell Date: Sun, 25 Sep 2005 07:17:31 +0000 Subject: [PATCH] Fix for crash in ~wxWindow() on solaris git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 9 +++++---- src/gtk1/window.cpp | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 813c527f68..03c6f88e39 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2901,6 +2901,11 @@ wxWindowGTK::~wxWindowGTK() gdk_ic_attr_destroy (m_icattr); #endif +#ifdef __WXGTK20__ + // delete before the widgets to avoid a crash on solaris + delete m_imData; +#endif + if (m_wxwindow) { gtk_widget_destroy( m_wxwindow ); @@ -2912,10 +2917,6 @@ wxWindowGTK::~wxWindowGTK() gtk_widget_destroy( m_widget ); m_widget = (GtkWidget*) NULL; } - -#ifdef __WXGTK20__ - delete m_imData; -#endif } bool wxWindowGTK::PreCreation( wxWindowGTK *parent, const wxPoint &pos, const wxSize &size ) diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 813c527f68..03c6f88e39 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -2901,6 +2901,11 @@ wxWindowGTK::~wxWindowGTK() gdk_ic_attr_destroy (m_icattr); #endif +#ifdef __WXGTK20__ + // delete before the widgets to avoid a crash on solaris + delete m_imData; +#endif + if (m_wxwindow) { gtk_widget_destroy( m_wxwindow ); @@ -2912,10 +2917,6 @@ wxWindowGTK::~wxWindowGTK() gtk_widget_destroy( m_widget ); m_widget = (GtkWidget*) NULL; } - -#ifdef __WXGTK20__ - delete m_imData; -#endif } bool wxWindowGTK::PreCreation( wxWindowGTK *parent, const wxPoint &pos, const wxSize &size ) -- 2.49.0