Applied patch 1283609 GTK window dtor + wxGrid + cellEditor ==> crash

David Surovell, OSAF


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2005-09-18 10:11:36 +00:00
parent 19c46ab5f3
commit 02c3e53b45
2 changed files with 26 additions and 4 deletions

View File

@ -2883,11 +2883,22 @@ wxWindowGTK::~wxWindowGTK()
m_isBeingDeleted = true;
m_hasVMT = false;
// destroy children before destroying this window itself
DestroyChildren();
// unhook focus handlers to prevent stray events being
// propagated to this (soon to be) dead object
if (m_focusWidget != NULL)
{
gtk_signal_disconnect_by_func( GTK_OBJECT(m_focusWidget),
(GtkSignalFunc) gtk_window_focus_in_callback, (gpointer) this );
gtk_signal_disconnect_by_func( GTK_OBJECT(m_focusWidget),
(GtkSignalFunc) gtk_window_focus_out_callback, (gpointer) this );
}
if (m_widget)
Show( false );
DestroyChildren();
#ifdef HAVE_XIM
if (m_ic)
gdk_ic_destroy (m_ic);

View File

@ -2883,11 +2883,22 @@ wxWindowGTK::~wxWindowGTK()
m_isBeingDeleted = true;
m_hasVMT = false;
// destroy children before destroying this window itself
DestroyChildren();
// unhook focus handlers to prevent stray events being
// propagated to this (soon to be) dead object
if (m_focusWidget != NULL)
{
gtk_signal_disconnect_by_func( GTK_OBJECT(m_focusWidget),
(GtkSignalFunc) gtk_window_focus_in_callback, (gpointer) this );
gtk_signal_disconnect_by_func( GTK_OBJECT(m_focusWidget),
(GtkSignalFunc) gtk_window_focus_out_callback, (gpointer) this );
}
if (m_widget)
Show( false );
DestroyChildren();
#ifdef HAVE_XIM
if (m_ic)
gdk_ic_destroy (m_ic);