Commit e0361765 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/listview: Remove redundant check in LVM_DELETECOLUMN handler.

parent 5faab43d
......@@ -5621,8 +5621,8 @@ static BOOL LISTVIEW_DeleteColumn(LISTVIEW_INFO *infoPtr, INT nColumn)
TRACE("nColumn=%d\n", nColumn);
if (nColumn < 0 || DPA_GetPtrCount(infoPtr->hdpaColumns) == 0
|| nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return FALSE;
if (nColumn < 0 || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns))
return FALSE;
/* While the MSDN specifically says that column zero should not be deleted,
what actually happens is that the column itself is deleted but no items or subitems
......
......@@ -1420,6 +1420,12 @@ static void test_columns(void)
10, 10, 100, 200, hwndparent, NULL, NULL, NULL);
ok(hwnd != NULL, "failed to create listview window\n");
rc = SendMessageA(hwnd, LVM_DELETECOLUMN, -1, 0);
ok(!rc, "got %d\n", rc);
rc = SendMessageA(hwnd, LVM_DELETECOLUMN, 0, 0);
ok(!rc, "got %d\n", rc);
/* Add a column with no mask */
memset(&column, 0xcc, sizeof(column));
column.mask = 0;
......
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