Commit 440218cf authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/listview: Handle NULL lParam in LVM_SETITEMSTATE.

parent 9e222c6c
......@@ -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:
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment