Fix wxImageList test failing under wxQt

This commit is contained in:
ali kettab 2023-10-10 12:13:42 +01:00
parent 0d47ca2463
commit 2f6052e337

View file

@ -601,7 +601,12 @@ void wxBitmap::QtBlendMaskWithAlpha()
{
AllocExclusive();
M_PIXDATA.setMask(*M_MASK->GetHandle());
wxDELETE(M_MASK);
// Notice that if the mask was created from a colour that does not exist in
// the bitmap, setMask() will have no effect on the bitmap. So only delete
// it if it has been applied successfully.
if ( HasAlpha() )
wxDELETE(M_MASK);
}
}