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:
@@ -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
|
||||
|
Reference in New Issue
Block a user