hhctrl: Fix keyword usage

André Hentschel nerv at dawncrow.de
Sat Jan 30 05:55:40 CST 2010


---
 dlls/hhctrl.ocx/index.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/hhctrl.ocx/index.c b/dlls/hhctrl.ocx/index.c
index dd61fe3..68f0d05 100644
--- a/dlls/hhctrl.ocx/index.c
+++ b/dlls/hhctrl.ocx/index.c
@@ -39,8 +39,10 @@ static void fill_index_tree(HWND hwnd, IndexItem *item)
         memset(&lvi, 0, sizeof(lvi));
         lvi.iItem = index++;
         lvi.mask = LVIF_TEXT|LVIF_PARAM;
-        lvi.cchTextMax = strlenW(item->keyword)+1;
-        lvi.pszText = item->keyword;
+        if (item->keyword) {
+            lvi.cchTextMax = strlenW(item->keyword)+1;
+            lvi.pszText = item->keyword;
+        }
         lvi.lParam = (LPARAM)item;
         item->id = (HTREEITEM)SendMessageW(hwnd, LVM_INSERTITEMW, 0, (LPARAM)&lvi);
         item = item->next;
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list