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
This commit is contained in:
Vadim Zeitlin 2007-11-19 01:59:24 +00:00
parent 2056dede02
commit 1510ba2c68

View File

@ -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)