X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3b9f782ef3949f583e8ac53795d36787f044fc3..f740587c9d406b5c7087853b85dbbb353362cb9a:/src/mgl/bitmap.cpp diff --git a/src/mgl/bitmap.cpp b/src/mgl/bitmap.cpp index 013e9f4674..5cf71c1672 100644 --- a/src/mgl/bitmap.cpp +++ b/src/mgl/bitmap.cpp @@ -58,7 +58,7 @@ static pixel_format_t gs_pixel_format_wxImage = {0xFF,0x00,0, 0xFF,0x08,0, 0xFF,0x10,0, 0x00,0x00,0}; // RGB 24bpp for wxImage //----------------------------------------------------------------------------- -// wxBitmap +// wxBitmapRefData //----------------------------------------------------------------------------- class wxBitmapRefData: public wxGDIRefData @@ -163,18 +163,15 @@ wxBitmapRefData::~wxBitmapRefData() delete m_palette; } + +//----------------------------------------------------------------------------- +// wxBitmap //----------------------------------------------------------------------------- #define M_BMPDATA ((wxBitmapRefData *)m_refData) IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxBitmapBase) -wxBitmap::wxBitmap(int width, int height, int depth) -{ - Create(width, height, depth); -} - - wxGDIRefData *wxBitmap::CreateGDIRefData() const { return new wxBitmapRefData; @@ -501,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;