X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/732d8c74f805e35cd398711fcd3969c4c668e259..0538419f9e7d1fd4af57f2f4e38c339cd091b0c5:/src/mgl/bitmap.cpp?ds=sidebyside diff --git a/src/mgl/bitmap.cpp b/src/mgl/bitmap.cpp index 3c717d4fe9..5cf71c1672 100644 --- a/src/mgl/bitmap.cpp +++ b/src/mgl/bitmap.cpp @@ -498,8 +498,7 @@ void wxBitmap::SetPalette(const wxPalette& palette) wxCHECK_RET( GetDepth() > 1 && GetDepth() <= 8, wxT("cannot set palette for bitmap of this depth") ); AllocExclusive(); - delete M_BMPDATA->m_palette; - M_BMPDATA->m_palette = NULL; + wxDELETE(M_BMPDATA->m_palette); if ( !palette.Ok() ) return;