From 9a88d25ba4d0852bf1ef67a29bdb6ca2ab37babc Mon Sep 17 00:00:00 2001 From: Frank Richter Date: Tue, 30 Aug 2005 08:54:31 +0000 Subject: [PATCH] Since theme images are reused now it's not really a good idea to delete them in drawing functions. --- dlls/uxtheme/draw.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c index b760bef4b44..df28a1eee78 100644 --- a/dlls/uxtheme/draw.c +++ b/dlls/uxtheme/draw.c @@ -429,7 +429,6 @@ static HRESULT UXTHEME_DrawImageGlyph(HTHEME hTheme, HDC hdc, int iPartId, hdcSrc = CreateCompatibleDC(hdc); if(!hdcSrc) { hr = HRESULT_FROM_WIN32(GetLastError()); - DeleteObject(bmpSrc); return hr; } oldSrc = SelectObject(hdcSrc, bmpSrc); @@ -459,7 +458,6 @@ static HRESULT UXTHEME_DrawImageGlyph(HTHEME hTheme, HDC hdc, int iPartId, SelectObject(hdcSrc, oldSrc); DeleteDC(hdcSrc); - DeleteObject(bmpSrc); return hr; } @@ -619,7 +617,6 @@ static HRESULT UXTHEME_DrawImageBackground(HTHEME hTheme, HDC hdc, int iPartId, hdcSrc = CreateCompatibleDC(hdc); if(!hdcSrc) { hr = HRESULT_FROM_WIN32(GetLastError()); - DeleteObject(bmpSrc); return hr; } oldSrc = SelectObject(hdcSrc, bmpSrc); @@ -770,7 +767,6 @@ draw_error: SetViewportOrgEx (hdcDst, org.x, org.y, NULL); } SelectObject(hdcSrc, oldSrc); - DeleteObject(bmpSrc); DeleteDC(hdcSrc); CopyRect(pRect, &rcDst); return hr;