gdiplus: Avoid deleting non-existent object.

oldstable
Kirill K. Smirnov 2009-10-25 17:05:47 +03:00 committed by Alexandre Julliard
parent eaa939e942
commit 125c5645cb
1 changed files with 0 additions and 4 deletions

View File

@ -932,11 +932,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON hicon, GpBitmap** bitmap)
TRACE("%p, %p\n", hicon, bitmap);
if(!bitmap || !GetIconInfo(hicon, &iinfo))
{
DeleteObject(iinfo.hbmColor);
DeleteObject(iinfo.hbmMask);
return InvalidParameter;
}
/* get the size of the icon */
ret = GetObjectA(iinfo.hbmColor ? iinfo.hbmColor : iinfo.hbmMask, sizeof(bm), &bm);