Don't dereference wxTheApp unconditionally when showing wxMessageDialog.

The application might not yet (or already) exist, don't crash in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-12-05 22:18:16 +00:00
parent e91fb2bbee
commit eb171a4592

View File

@@ -430,7 +430,7 @@ wxFont wxMessageDialog::GetMessageFont()
int wxMessageDialog::ShowMessageBox()
{
if ( !wxTheApp->GetTopWindow() )
if ( wxTheApp && !wxTheApp->GetTopWindow() )
{
// when the message box is shown from wxApp::OnInit() (i.e. before the
// message loop is entered), this must be done or the next message box