Don't crash in timer callback added to work around broken Ubuntu 11.04 WM,
remove it when the window is being destroyed.
This corrects a crash which happened if a TLW was created and destroyed before
this timer had time to fire under Ubuntu.
Closes #13146.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67942
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
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) )