X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..753cba1a750ae50d39313201ffa29bd14f7bcf71:/src/mgl/app.cpp diff --git a/src/mgl/app.cpp b/src/mgl/app.cpp index 113516fe71..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); } //----------------------------------------------------------------------------- @@ -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;