Commit 9a88d25b authored by Frank Richter's avatar Frank Richter Committed by Alexandre Julliard

Since theme images are reused now it's not really a good idea to

delete them in drawing functions.
parent f6e7e14e
...@@ -429,7 +429,6 @@ static HRESULT UXTHEME_DrawImageGlyph(HTHEME hTheme, HDC hdc, int iPartId, ...@@ -429,7 +429,6 @@ static HRESULT UXTHEME_DrawImageGlyph(HTHEME hTheme, HDC hdc, int iPartId,
hdcSrc = CreateCompatibleDC(hdc); hdcSrc = CreateCompatibleDC(hdc);
if(!hdcSrc) { if(!hdcSrc) {
hr = HRESULT_FROM_WIN32(GetLastError()); hr = HRESULT_FROM_WIN32(GetLastError());
DeleteObject(bmpSrc);
return hr; return hr;
} }
oldSrc = SelectObject(hdcSrc, bmpSrc); oldSrc = SelectObject(hdcSrc, bmpSrc);
...@@ -459,7 +458,6 @@ static HRESULT UXTHEME_DrawImageGlyph(HTHEME hTheme, HDC hdc, int iPartId, ...@@ -459,7 +458,6 @@ static HRESULT UXTHEME_DrawImageGlyph(HTHEME hTheme, HDC hdc, int iPartId,
SelectObject(hdcSrc, oldSrc); SelectObject(hdcSrc, oldSrc);
DeleteDC(hdcSrc); DeleteDC(hdcSrc);
DeleteObject(bmpSrc);
return hr; return hr;
} }
...@@ -619,7 +617,6 @@ static HRESULT UXTHEME_DrawImageBackground(HTHEME hTheme, HDC hdc, int iPartId, ...@@ -619,7 +617,6 @@ static HRESULT UXTHEME_DrawImageBackground(HTHEME hTheme, HDC hdc, int iPartId,
hdcSrc = CreateCompatibleDC(hdc); hdcSrc = CreateCompatibleDC(hdc);
if(!hdcSrc) { if(!hdcSrc) {
hr = HRESULT_FROM_WIN32(GetLastError()); hr = HRESULT_FROM_WIN32(GetLastError());
DeleteObject(bmpSrc);
return hr; return hr;
} }
oldSrc = SelectObject(hdcSrc, bmpSrc); oldSrc = SelectObject(hdcSrc, bmpSrc);
...@@ -770,7 +767,6 @@ draw_error: ...@@ -770,7 +767,6 @@ draw_error:
SetViewportOrgEx (hdcDst, org.x, org.y, NULL); SetViewportOrgEx (hdcDst, org.x, org.y, NULL);
} }
SelectObject(hdcSrc, oldSrc); SelectObject(hdcSrc, oldSrc);
DeleteObject(bmpSrc);
DeleteDC(hdcSrc); DeleteDC(hdcSrc);
CopyRect(pRect, &rcDst); CopyRect(pRect, &rcDst);
return hr; return hr;
......
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