diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index 0e85014c2de..cb10be4ee15 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -311,7 +311,7 @@ static void TestCallback(void) ok(ret == 1, "Expected SetItem return 1, got %ld\n", ret); tvi.pszText = buf; TreeView_GetItem(hTree, &tvi); - todo_wine ok(strcmp(tvi.pszText, TEST_CALLBACK_TEXT) == 0, "Item text mismatch %s vs %s\n", + ok(strcmp(tvi.pszText, TEST_CALLBACK_TEXT) == 0, "Item text mismatch %s vs %s\n", tvi.pszText, TEST_CALLBACK_TEXT); U(ins).item.pszText = NULL; @@ -320,7 +320,7 @@ static void TestCallback(void) tvi.hItem = hItem2; memset(buf, 0, sizeof(buf)); TreeView_GetItem(hTree, &tvi); - todo_wine ok(strcmp(tvi.pszText, TEST_CALLBACK_TEXT) == 0, "Item text mismatch %s vs %s\n", + ok(strcmp(tvi.pszText, TEST_CALLBACK_TEXT) == 0, "Item text mismatch %s vs %s\n", tvi.pszText, TEST_CALLBACK_TEXT); } diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index dd0563ad834..abc6fc7fa10 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -1112,7 +1112,7 @@ TREEVIEW_DoSetItemT(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem, if (tvItem->mask & TVIF_TEXT) { wineItem->textWidth = 0; /* force width recalculation */ - if (tvItem->pszText != LPSTR_TEXTCALLBACKW) /* covers != TEXTCALLBACKA too */ + if (tvItem->pszText != LPSTR_TEXTCALLBACKW && tvItem->pszText != NULL) /* covers != TEXTCALLBACKA too, and undocumented: pszText of NULL also means TEXTCALLBACK */ { int len; LPWSTR newText;