Added assert (WinCE doesn't report checked status correctly)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2005-02-16 14:44:15 +00:00
parent 4b4f6e0fdd
commit 26a12ab34c

View File

@@ -905,7 +905,14 @@ void MyFrame::ModelessDlg(wxCommandEvent& event)
}
else // hide
{
m_dialog->Hide();
// If m_dialog is NULL, then possibly the system
// didn't report the checked menu item status correctly.
// It should be true just after the menu item was selected,
// if there was no modeless dialog yet.
wxASSERT( m_dialog != NULL );
if (m_dialog)
m_dialog->Hide();
}
}
#endif // USE_MODAL_PRESENTATION