GetImageListBitmaps() -- don't modify if invalid
If the bitmap is empty or invalid, there is no reason to attempt to add a mask, alpha channel, etc.
This commit is contained in:
parent
994bc961e7
commit
aa29faed81
1 changed files with 6 additions and 0 deletions
|
|
@ -167,6 +167,12 @@ void
|
|||
wxImageList::GetImageListBitmaps(wxMSWBitmaps& bitmaps,
|
||||
const wxBitmap& bitmap, const wxBitmap& mask)
|
||||
{
|
||||
if (!bitmap.IsOk())
|
||||
{
|
||||
// We can't do anything with an invalid bitmap.
|
||||
return;
|
||||
}
|
||||
|
||||
// This can be overwritten below if we need to modify the bitmap, but it
|
||||
// doesn't cost anything to initialize the bitmap with this HBITMAP.
|
||||
bitmaps.hbmp = GetHbitmapOf(bitmap);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue