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