Anatoly Lyutin : user32: Fix return value in ShowScrollBar according with test.
Alexandre Julliard
julliard at winehq.org
Mon Feb 25 06:51:35 CST 2008
Module: wine
Branch: master
Commit: a871830dd397ec6b605c2b34e2c4d02f1177d1e7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a871830dd397ec6b605c2b34e2c4d02f1177d1e7
Author: Anatoly Lyutin <vostok at etersoft.ru>
Date: Fri Feb 22 17:03:32 2008 +0300
user32: Fix return value in ShowScrollBar according with test.
---
dlls/user32/scroll.c | 3 +++
dlls/user32/tests/scroll.c | 5 +----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c
index bd2feb9..6f52754 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 5832b51..3bc407a 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" );
}
More information about the wine-cvs
mailing list