Author: tfaber
Date: Wed May 3 11:12:04 2017
New Revision: 74456
URL:
http://svn.reactos.org/svn/reactos?rev=74456&view=rev
Log:
[0.4.5]
- Merge Giannis's imagelist leak fix from r74440/r74443.
Modified:
branches/ros-branch-0_4_5/ (props changed)
branches/ros-branch-0_4_5/reactos/ (props changed)
branches/ros-branch-0_4_5/reactos/dll/win32/comctl32/imagelist.c
Propchange: branches/ros-branch-0_4_5/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed May 3 11:12:04 2017
@@ -1,2 +1,2 @@
/branches/colins-printing-for-freedom:67543-68405,68407-68414,68417-70595
-/trunk:74437-74438,74441
+/trunk:74437-74438,74440-74441,74443
Propchange: branches/ros-branch-0_4_5/reactos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed May 3 11:12:04 2017
@@ -23,4 +23,4 @@
/branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859
/branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567
/branches/wlan-bringup:54809-54998
-/trunk/reactos:74437-74438,74441
+/trunk/reactos:74437-74438,74440-74441,74443
Modified: branches/ros-branch-0_4_5/reactos/dll/win32/comctl32/imagelist.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_5/reactos/dll/wi…
==============================================================================
--- branches/ros-branch-0_4_5/reactos/dll/win32/comctl32/imagelist.c [iso-8859-1]
(original)
+++ branches/ros-branch-0_4_5/reactos/dll/win32/comctl32/imagelist.c [iso-8859-1] Wed May
3 11:12:04 2017
@@ -1444,6 +1444,9 @@
HBRUSH hOldBrush;
POINT pt;
BOOL has_alpha;
+#ifdef __REACTOS__
+ HDC hdcSaturated = NULL;
+#endif
if (!pimldp || !(himl = pimldp->himl)) return FALSE;
if (!is_valid(himl)) return FALSE;
@@ -1500,9 +1503,10 @@
*/
if (fState & ILS_SATURATE)
{
- hImageListDC = saturate_image(himl, pimldp->hdcDst, pimldp->x,
pimldp->y,
+ hdcSaturated = saturate_image(himl, pimldp->hdcDst, pimldp->x,
pimldp->y,
pt.x, pt.y, cx, cy, pimldp->rgbFg);
+ hImageListDC = hdcSaturated;
/* shitty way of getting subroutines to blit at the right place (top left
corner),
as our modified imagelist only contains a single image for performance reasons
*/
pt.x = 0;
@@ -1672,6 +1676,10 @@
SetTextColor(hImageDC, oldImageFg);
SelectObject(hImageDC, hOldImageBmp);
cleanup:
+#ifdef __REACTOS__
+ if (hdcSaturated)
+ DeleteDC(hdcSaturated);
+#endif
DeleteObject(hBlendMaskBmp);
DeleteObject(hImageBmp);
DeleteDC(hImageDC);