comctl32: fix Itemtext in treeview.c (Bug #16466)
André H.
nerv at dawncrow.de
Sun Jan 11 09:39:13 CST 2009
Some Apps sends Zero for tvItem->pszText. That should mean LPSTR_TEXTCALLBACKW.
Without this it runs in a Unhandled page fault on read access to 0x00000000.
---
dlls/comctl32/treeview.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index dd0563a..1b5162c 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 != 0) /* covers != TEXTCALLBACKA too */
{
int len;
LPWSTR newText;
--
1.6.0.4
--------------080108020703010107050002--
More information about the wine-patches
mailing list