]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/imaglist.cpp
added a hack to work around the dummy kill focus messages under GTK
[wxWidgets.git] / 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);
 }