- 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));
+ }