From 763c5a75087693cda764d9831d415777d5f92815 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 1 Nov 2007 18:50:24 -0700 Subject: [PATCH] comctl32: fix uninitialized, unused variables --- dlls/comctl32/status.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index 4748083..dcfe801 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -633,7 +633,6 @@ STATUSBAR_SetMinHeight (STATUS_INFO *inf RECT parent_rect; HTHEME theme; - GetClientRect (infoPtr->Notify, &parent_rect); infoPtr->height = height + infoPtr->verticalBorder; if ((theme = GetWindowTheme (infoPtr->Self))) @@ -651,13 +650,14 @@ STATUSBAR_SetMinHeight (STATUS_INFO *inf ReleaseDC (infoPtr->Self, hdc); } - width = parent_rect.right - parent_rect.left; - x = parent_rect.left; - y = parent_rect.bottom - infoPtr->height; - MoveWindow (infoPtr->Self, parent_rect.left, - parent_rect.bottom - infoPtr->height, - width, infoPtr->height, TRUE); - STATUSBAR_SetPartBounds (infoPtr); + if (GetClientRect (infoPtr->Notify, &parent_rect)) + { + width = parent_rect.right - parent_rect.left; + x = parent_rect.left; + y = parent_rect.bottom - infoPtr->height; + MoveWindow (infoPtr->Self, x, y, width, infoPtr->height, TRUE); + STATUSBAR_SetPartBounds (infoPtr); + } } return TRUE; @@ -1191,13 +1191,13 @@ STATUSBAR_WMSize (STATUS_INFO *infoPtr, if (GetWindowLongW(infoPtr->Self, GWL_STYLE) & CCS_NORESIZE) return FALSE; /* width and height don't apply */ - GetClientRect (infoPtr->Notify, &parent_rect); + if (!GetClientRect (infoPtr->Notify, &parent_rect)) + return FALSE; + width = parent_rect.right - parent_rect.left; x = parent_rect.left; y = parent_rect.bottom - infoPtr->height; - MoveWindow (infoPtr->Self, parent_rect.left, - parent_rect.bottom - infoPtr->height, - width, infoPtr->height, TRUE); + MoveWindow (infoPtr->Self, x, y, width, infoPtr->height, TRUE); STATUSBAR_SetPartBounds (infoPtr); return TRUE; } -- 1.4.1