X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4b6a582bef796b43ad4cf0a96bd40bfd631460c6..7198c3368055d88249a338eb33b21f051f674806:/src/mgl/app.cpp?ds=sidebyside diff --git a/src/mgl/app.cpp b/src/mgl/app.cpp index fc87f16acb..753d2df7f6 100644 --- a/src/mgl/app.cpp +++ b/src/mgl/app.cpp @@ -120,8 +120,7 @@ static bool wxCreateMGL_WM(const wxVideoMode& displayMode) g_displayDC = new MGLDisplayDC(mode, 1, refresh); if ( !g_displayDC->isValid() ) { - delete g_displayDC; - g_displayDC = NULL; + wxDELETE(g_displayDC); return false; } @@ -139,11 +138,7 @@ static void wxDestroyMGL_WM() MGL_wmDestroy(g_winMng); g_winMng = NULL; } - if ( g_displayDC ) - { - delete g_displayDC; - g_displayDC = NULL; - } + wxDELETE(g_displayDC); } //----------------------------------------------------------------------------- @@ -166,7 +161,7 @@ wxVideoMode wxGetDefaultDisplayMode() unsigned w, h, bpp; if ( !wxGetEnv(wxT("WXMODE"), &mode) || - (wxSscanf(mode.c_str(), _T("%ux%u-%u"), &w, &h, &bpp) != 3) ) + (wxSscanf(mode.c_str(), wxT("%ux%u-%u"), &w, &h, &bpp) != 3) ) { w = 640, h = 480, bpp = 16; } @@ -202,7 +197,7 @@ bool wxApp::OnInitGui() if ( !wxAppBase::OnInitGui() ) return false; - // MGL redirects stdout and stderr to physical console, so lets redirect + // MGL redirects stdout and stderr to physical console, so let's redirect // it to file if WXSTDERR environment variable is set to be able to see // wxLogDebug() output wxString redirect;