Unregister configure callback, fixes #12447: wxGTK patch: Segfault on Drag&Drop

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@65480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2010-09-08 20:01:32 +00:00
parent 741c337588
commit 636ba3c242

View File

@@ -946,21 +946,27 @@ void wxDropSource::RegisterWindow()
void wxDropSource::UnregisterWindow()
{
if (!m_widget)
return;
if (m_widget)
{
g_signal_handlers_disconnect_by_func (m_widget,
(gpointer) source_drag_data_get,
this);
g_signal_handlers_disconnect_by_func (m_widget,
(gpointer) source_drag_data_delete,
this);
g_signal_handlers_disconnect_by_func (m_widget,
(gpointer) source_drag_begin,
this);
g_signal_handlers_disconnect_by_func (m_widget,
(gpointer) source_drag_end,
this);
}
g_signal_handlers_disconnect_by_func (m_widget,
(gpointer) source_drag_data_get,
this);
g_signal_handlers_disconnect_by_func (m_widget,
(gpointer) source_drag_data_delete,
this);
g_signal_handlers_disconnect_by_func (m_widget,
(gpointer) source_drag_begin,
this);
g_signal_handlers_disconnect_by_func (m_widget,
(gpointer) source_drag_end,
this);
if (m_iconWindow)
{
g_signal_handlers_disconnect_by_func (m_iconWindow,
(gpointer) gtk_dnd_window_configure_callback, this);
}
}
#endif