Only update the mask if the mask is valid

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-11-15 03:07:39 +00:00
parent a91cf80c60
commit a7f1fbf609

View 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);
}