X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33ac7e6f01acbac1cff0ad400d8ea7f0bfd0a62f..41286fd1def19641be3ae5bb9666c84a1c0b5525:/src/msw/dib.cpp diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp index 5a9017faf0..f5b86d7c2b 100644 --- a/src/msw/dib.cpp +++ b/src/msw/dib.cpp @@ -708,12 +708,14 @@ bool wxLoadIntoBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette **pal) if (hPalette) { +#if wxUSE_PALETTE if (pal) { *pal = new wxPalette; (*pal)->SetHPALETTE((WXHPALETTE) hPalette); } else +#endif // wxUSE_PALETTE DeleteObject(hPalette); } else if (pal) @@ -928,8 +930,10 @@ HANDLE wxBitmapToDIB (HBITMAP hBitmap, HPALETTE hPal) bool wxSaveBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette *colourmap) { HPALETTE hPalette = 0; +#if wxUSE_PALETTE if (colourmap) hPalette = (HPALETTE) colourmap->GetHPALETTE(); +#endif // wxUSE_PALETTE HANDLE dibHandle = wxBitmapToDIB((HBITMAP) bitmap->GetHBITMAP(), hPalette); if (dibHandle) @@ -941,4 +945,3 @@ bool wxSaveBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette *colourmap) else return FALSE; } -