diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index f749bc1251..170bf9cb43 100644 --- a/src/mgl/window.cpp +++ b/src/mgl/window.cpp @@ -476,7 +476,10 @@ void wxWindowMGL::Init() // First of all, make sure window manager is up and running. If it is // not the case, initialize it in default display mode if ( !g_winMng ) - wxTheApp->SetDisplayMode(wxGetDefaultDisplayMode()); + { + if ( !wxTheApp->SetDisplayMode(wxGetDefaultDisplayMode()) ) + wxFatalError(_("Cannot initialize display.")); + } // generic: InitBase();