From: Vadim Zeitlin Date: Mon, 19 Nov 2007 01:59:24 +0000 (+0000) Subject: only call hildon_program_remove_window() when destroying a real HildonWindow (we... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1510ba2c68bba8fb480a15de5df1fc200f5ca9d4 only call hildon_program_remove_window() when destroying a real HildonWindow (we may also have an object of a derived dialog class using a different GTK widget) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 89a5791978..76c8b4ce1c 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -682,8 +682,12 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent, wxTopLevelWindowGTK::~wxTopLevelWindowGTK() { #if wxUSE_LIBHILDON - hildon_program_remove_window(wxTheApp->GetHildonProgram(), - HILDON_WINDOW(m_widget)); + // it can also be a (standard) dialog + if ( HILDON_IS_WINDOW(m_widget) ) + { + hildon_program_remove_window(wxTheApp->GetHildonProgram(), + HILDON_WINDOW(m_widget)); + } #endif // wxUSE_LIBHILDON if (m_grabbed)