appwiz: ignore Apps without title in the list

André Hentschel nerv at dawncrow.de
Sun Oct 25 05:51:15 CDT 2009


Also fixes Bug 20417
---
 dlls/appwiz.cpl/appwiz.c |   40 +++++++++++++++++++++-------------------
 1 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/dlls/appwiz.cpl/appwiz.c b/dlls/appwiz.cpl/appwiz.c
index 0d9e555..7f2e9f0 100644
--- a/dlls/appwiz.cpl/appwiz.c
+++ b/dlls/appwiz.cpl/appwiz.c
@@ -347,31 +347,33 @@ static void AddApplicationsToList(HWND hWnd, HIMAGELIST hList)
 
     while (iter)
     {
-        /* get the icon */
-        index = 0;
-
-        if (iter->icon)
+        if(strlenW(iter->title))
         {
-            if (ExtractIconExW(iter->icon, iter->iconIdx, NULL, &hIcon, 1) == 1)
+            /* get the icon */
+            index = 0;
+
+            if (iter->icon)
             {
-                index = ImageList_AddIcon(hList, hIcon);
-                DestroyIcon(hIcon);
+                if (ExtractIconExW(iter->icon, iter->iconIdx, NULL, &hIcon, 1) == 1)
+                {
+                    index = ImageList_AddIcon(hList, hIcon);
+                    DestroyIcon(hIcon);
+                }
             }
-        }
-
-        lvItem.mask = LVIF_IMAGE | LVIF_TEXT | LVIF_PARAM;
-        lvItem.iItem = iter->id;
-        lvItem.iSubItem = 0;
-        lvItem.pszText = iter->title;
-        lvItem.iImage = index;
-        lvItem.lParam = iter->id;
 
-        index = ListView_InsertItemW(hWnd, &lvItem);
+            lvItem.mask = LVIF_IMAGE | LVIF_TEXT | LVIF_PARAM;
+            lvItem.iItem = iter->id;
+            lvItem.iSubItem = 0;
+            lvItem.pszText = iter->title;
+            lvItem.iImage = index;
+            lvItem.lParam = iter->id;
 
-        /* now add the subitems (columns) */
-        ListView_SetItemTextW(hWnd, index, 1, iter->publisher);
-        ListView_SetItemTextW(hWnd, index, 2, iter->version);
+            index = ListView_InsertItemW(hWnd, &lvItem);
 
+            /* now add the subitems (columns) */
+            ListView_SetItemTextW(hWnd, index, 1, iter->publisher);
+            ListView_SetItemTextW(hWnd, index, 2, iter->version);
+        }
         iter = iter->next;
     }
 }
-- 
1.6.5.1.75.g02d56



More information about the wine-patches mailing list