X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7462bddbafe6ed4bd6186c07e6edc43dc16741eb..7be2a7af39888b264eb0c5787fb2914005633d1b:/src/common/image.cpp diff --git a/src/common/image.cpp b/src/common/image.cpp index 5d65ecaa9c..2c61998e6d 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -2306,7 +2306,10 @@ static wxImage LoadImageFromResource(const wxString &name, wxBitmapType type) image.SetMaskColour(0xc0, 0xc0, 0xc0); } - image.InitAlpha(); + // We could have already loaded alpha from the resources, but if not, + // initialize it now using the mask. + if ( !image.HasAlpha() ) + image.InitAlpha(); return image; }