X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..050c9e3c90c58b05d5b3f7384d1556ca9669f13e:/src/generic/imaglist.cpp?ds=inline 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); }