gdiplus: Avoid deleting non-existent object.

This commit is contained in:
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); TRACE("%p, %p\n", hicon, bitmap);
if(!bitmap || !GetIconInfo(hicon, &iinfo)) if(!bitmap || !GetIconInfo(hicon, &iinfo))
{
DeleteObject(iinfo.hbmColor);
DeleteObject(iinfo.hbmMask);
return InvalidParameter; return InvalidParameter;
}
/* get the size of the icon */ /* get the size of the icon */
ret = GetObjectA(iinfo.hbmColor ? iinfo.hbmColor : iinfo.hbmMask, sizeof(bm), &bm); ret = GetObjectA(iinfo.hbmColor ? iinfo.hbmColor : iinfo.hbmMask, sizeof(bm), &bm);