From 125c5645cbcb5909856e6236c5674089f8e06037 Mon Sep 17 00:00:00 2001 From: "Kirill K. Smirnov" Date: Sun, 25 Oct 2009 17:05:47 +0300 Subject: [PATCH] gdiplus: Avoid deleting non-existent object. --- dlls/gdiplus/image.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 9813e524923..5b70918aa07 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -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);