g_displayDC = new MGLDisplayDC(mode, 1, refresh);
if ( !g_displayDC->isValid() )
{
- delete g_displayDC;
- g_displayDC = NULL;
+ wxDELETE(g_displayDC);
return false;
}
MGL_wmDestroy(g_winMng);
g_winMng = NULL;
}
- if ( g_displayDC )
- {
- delete g_displayDC;
- g_displayDC = NULL;
- }
+ wxDELETE(g_displayDC);
}
//-----------------------------------------------------------------------------