user32: Don't crash if passed a non-scrollbar HWND. Fixes Coverity id 265.

This commit is contained in:
Juan Lang 2008-09-11 09:21:43 -07:00 committed by Alexandre Julliard
parent 18d2653c3b
commit 6049ad74e9
1 changed files with 3 additions and 1 deletions

View File

@ -1256,7 +1256,9 @@ static BOOL SCROLL_GetScrollBarInfo(HWND hwnd, LONG idObject, LPSCROLLBARINFO in
info->xyThumbBottom = info->xyThumbTop + info->dxyLineButton;
infoPtr = SCROLL_GetInternalInfo(hwnd, nBar, TRUE);
if (!infoPtr)
return FALSE;
/* Scroll bar state */
info->rgstate[0] = 0;
if ((nBar == SB_HORZ && !(style & WS_HSCROLL))