Nikolay Sivov : comctl32/listview: Handle NULL lParam in LVM_SETITEMSTATE.
Alexandre Julliard
julliard at winehq.org
Fri Jul 24 08:49:23 CDT 2009
Module: wine
Branch: master
Commit: 440218cfdea41a60b53822e2735afea74630b54e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=440218cfdea41a60b53822e2735afea74630b54e
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Thu Jul 23 23:46:22 2009 +0400
comctl32/listview: Handle NULL lParam in LVM_SETITEMSTATE.
---
dlls/comctl32/listview.c | 1 +
dlls/comctl32/tests/listview.c | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 73781b2..05c033e 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -10653,6 +10653,7 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return LISTVIEW_SetItemPosition(infoPtr, (INT)wParam, *((POINT*)lParam));
case LVM_SETITEMSTATE:
+ if (lParam == 0) return FALSE;
return LISTVIEW_SetItemState(infoPtr, (INT)wParam, (LPLVITEMW)lParam);
case LVM_SETITEMTEXTA:
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 9e92202..bf87bca 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -1963,6 +1963,10 @@ static void test_multiselect(void)
item_count = (int)SendMessage(hwnd, LVM_GETITEMCOUNT, 0, 0);
expect(items,item_count);
+ /* try with NULL pointer */
+ r = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)NULL);
+ expect(FALSE, r);
+
/* select all, check notifications */
ListView_SetItemState(hwnd, -1, 0, LVIS_SELECTED);
More information about the wine-cvs
mailing list