]> git.saurik.com Git - wxWidgets.git/commitdiff
Only update the mask if the mask is valid
authorRobin Dunn <robin@alldunn.com>
Thu, 15 Nov 2001 03:07:39 +0000 (03:07 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 15 Nov 2001 03:07:39 +0000 (03:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/imaglist.cpp

index 12f621afce17934a1027001e00b83544209eee3a..aa3a2922080ae0b27b0c18f1ca7f992a0d5c21b2 100644 (file)
@@ -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);
 }