From 831d7c9721a56d022d13ca2cc04a5cbacde427c4 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 3 Sep 2015 06:24:13 +0000 Subject: [PATCH] [EXPLORER] remove dead code CID 1321923, 1321924 svn path=/trunk/; revision=68923 --- reactos/base/shell/explorer/traywnd.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/reactos/base/shell/explorer/traywnd.cpp b/reactos/base/shell/explorer/traywnd.cpp index 120d7c59935..f4cca036335 100644 --- a/reactos/base/shell/explorer/traywnd.cpp +++ b/reactos/base/shell/explorer/traywnd.cpp @@ -190,7 +190,7 @@ DefSize: HDC hDC = NULL; HDC hDCScreen = NULL; SIZE Size, SmallIcon; - HBITMAP hbmpOld, hbmp = NULL; + HBITMAP hbmpOld; HBITMAP hBitmap = NULL; HICON hIconStart; BOOL Ret; @@ -243,10 +243,10 @@ DefSize: Size.cy = max(Size.cy, SmallIcon.cy); /* Create the bitmap */ - hbmp = CreateCompatibleBitmap(hDCScreen, + hBitmap = CreateCompatibleBitmap(hDCScreen, Size.cx, Size.cy); - if (hbmp == NULL) + if (hBitmap == NULL) goto Cleanup; /* Caluclate the button rect */ @@ -256,7 +256,7 @@ DefSize: rcButton.bottom = Size.cy; /* Draw the button */ - hbmpOld = (HBITMAP) SelectObject(hDC, hbmp); + hbmpOld = (HBITMAP) SelectObject(hDC, hBitmap); Flags = DC_TEXT | DC_INBUTTON; if (hIconStart != NULL) @@ -275,19 +275,12 @@ DefSize: if (!Ret) goto Cleanup; - /* We successfully created the bitmap! */ - hBitmap = hbmp; - hbmp = NULL; - Cleanup: if (hDCScreen != NULL) { ::ReleaseDC(NULL, hDCScreen); } - if (hbmp != NULL) - DeleteObject(hbmp); - if (hDC != NULL) DeleteDC(hDC);