[SETUPLIB][USETUP] Remove the deprecated GenericListHasSingleEntry() function and...
[reactos.git] / base / setup / usetup / genlist.c
index 8e8baff..c43f89c 100644 (file)
@@ -356,17 +356,20 @@ DrawGenericListCurrentItem(
     IN SHORT Left,
     IN SHORT Top)
 {
-    //
-    // FIXME: That stuff crashes when the list is empty!!
-    //
     CHAR CurrentItemText[256];
-    if (GetEntryDescriptionProc)
+
+    if (GetEntryDescriptionProc &&
+        GetNumberOfListEntries(List) > 0)
     {
         GetEntryDescriptionProc(GetCurrentListEntry(List),
                                 CurrentItemText,
                                 ARRAYSIZE(CurrentItemText));
         CONSOLE_SetTextXY(Left, Top, CurrentItemText);
     }
+    else
+    {
+        CONSOLE_SetTextXY(Left, Top, "");
+    }
 }
 
 VOID