diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index bd2feb949cc..6f527540d62 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -1998,6 +1998,9 @@ static BOOL SCROLL_ShowScrollBar( HWND hwnd, INT nBar, BOOL fShowH, BOOL fShowV */ BOOL WINAPI ShowScrollBar(HWND hwnd, INT nBar, BOOL fShow) { + if ( !hwnd ) + return FALSE; + SCROLL_ShowScrollBar( hwnd, nBar, (nBar == SB_VERT) ? 0 : fShow, (nBar == SB_HORZ) ? 0 : fShow ); return TRUE; diff --git a/dlls/user32/tests/scroll.c b/dlls/user32/tests/scroll.c index 5832b51726f..3bc407a8641 100644 --- a/dlls/user32/tests/scroll.c +++ b/dlls/user32/tests/scroll.c @@ -123,10 +123,7 @@ static void scrollbar_test3(void) ok( !IsWindowVisible( hScroll ), "The scrollbar window should be visible\n" ); ret = ShowScrollBar( NULL, SB_CTL, TRUE ); - todo_wine - { - ok( !ret, "The ShowScrollBar() should failed.\n" ); - } + ok( !ret, "The ShowScrollBar() should failed.\n" ); }