Commit 125c5645 authored by Kirill K. Smirnov's avatar Kirill K. Smirnov Committed by Alexandre Julliard

gdiplus: Avoid deleting non-existent object.

parent eaa939e9
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment