[COMCTL32] -Rebar: Fix a region handle leak when themes are enabled.
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Mon, 1 May 2017 12:44:24 +0000 (12:44 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Mon, 1 May 2017 12:44:24 +0000 (12:44 +0000)
svn path=/trunk/; revision=74438

reactos/dll/win32/comctl32/rebar.c

index 1706957..4912b88 100644 (file)
@@ -1974,8 +1974,8 @@ static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC hdc)
         HBRUSH hbrush = CreateSolidBrush(new);
         FillRgn(hdc, hrgn, hbrush);
         DeleteObject(hbrush);
-        DeleteObject(hrgn);
     }
+    DeleteObject(hrgn);
 #endif
     return TRUE;
 }