comctl32/listview: Handle NULL lParam in LVM_SETITEMSTATE.

This commit is contained in:
Nikolay Sivov 2009-07-23 23:46:22 +04:00 committed by Alexandre Julliard
parent 9e222c6cbb
commit 440218cfde
2 changed files with 5 additions and 0 deletions

View File

@ -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:

View File

@ -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);