diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 03bf36695f..5062335525 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -713,6 +713,13 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent, wxTopLevelWindowGTK::~wxTopLevelWindowGTK() { + if ( m_netFrameExtentsTimerId ) + { + // Don't let the timer callback fire as the window pointer passed to it + // will become invalid very soon. + g_source_remove(m_netFrameExtentsTimerId); + } + #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 // it can also be a (standard) dialog if ( HILDON_IS_WINDOW(m_widget) )