X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..a103111baede60d2670479471cd5b620c04c885b:/src/generic/imaglist.cpp?ds=sidebyside diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp index 12f621afce..aa3a292208 100644 --- a/src/generic/imaglist.cpp +++ b/src/generic/imaglist.cpp @@ -68,7 +68,8 @@ int wxImageList::Add( const wxBitmap &bitmap ) int wxImageList::Add( const wxBitmap& bitmap, const wxBitmap& mask ) { wxBitmap bmp(bitmap); - bmp.SetMask(new wxMask(mask)); + if (mask.Ok()) + bmp.SetMask(new wxMask(mask)); return Add(bmp); }