X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de5eec8ebba3ce69b8e4e841dbd3877f4710727b..9470921fbb927af3a4432a27d52c372998311964:/src/mac/bitmap.cpp diff --git a/src/mac/bitmap.cpp b/src/mac/bitmap.cpp index 84b1bae5c1..6cbaa9d9b7 100644 --- a/src/mac/bitmap.cpp +++ b/src/mac/bitmap.cpp @@ -551,7 +551,9 @@ wxBitmap wxBitmap::GetSubBitmap(const wxRect &rect) const wxBitmapRefData *ref = (wxBitmapRefData *)ret.GetRefData(); ref->m_numColors = M_BITMAPDATA->m_numColors; - ref->m_bitmapPalette = M_BITMAPDATA->m_bitmapPalette; +#if wxUSE_PALETTE + ref->m_bitmapPalette = M_BITMAPDATA->m_bitmapPalette; +#endif // wxUSE_PALETTE ref->m_bitmapType = M_BITMAPDATA->m_bitmapType; // Copy sub region of this bitmap @@ -1031,6 +1033,7 @@ void wxBitmap::SetOk(bool isOk) M_BITMAPDATA->m_ok = isOk; } +#if wxUSE_PALETTE wxPalette *wxBitmap::GetPalette() const { wxCHECK_MSG( Ok(), NULL, wxT("Invalid bitmap GetPalette()") ); @@ -1045,6 +1048,7 @@ void wxBitmap::SetPalette(const wxPalette& palette) M_BITMAPDATA->m_bitmapPalette = palette ; } +#endif // wxUSE_PALETTE void wxBitmap::SetMask(wxMask *mask) {