Fix build with wxUSE_CAIRO==1 under wxMSW/wxOSX

'bmpSource' is declared later but we can check
original bitmap 'bmp' for 'alpha flag' instead
because 'bmpSource' is just a non-const copy
of 'bmp'.
This commit is contained in:
Artur Wieczorek
2019-11-17 22:17:27 +01:00
parent 3ca6e04d61
commit bdee154c96

View File

@@ -1493,7 +1493,7 @@ wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitm
#if defined(__WXMSW__) || defined(__WXOSX__)
// Under MSW and OSX we can have 32 bpp xRGB bitmaps (without alpha).
const bool hasAlpha = bmpSource.HasAlpha();
const bool hasAlpha = bmp.HasAlpha();
#endif
cairo_format_t bufferFormat =