diff --git a/src/uifc/uifc32.c b/src/uifc/uifc32.c
index 16ab7cad1c7a6ab064bb2b24bed908538b938250..1f93353836dae4af8599ea074ab756cd2828251d 100644
--- a/src/uifc/uifc32.c
+++ b/src/uifc/uifc32.c
@@ -1715,7 +1715,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
 						case CTRL_G:
 							if(/*!(api->mode&UIFC_NOCTRL)*/1) { // No no, *this* control key is fine!
 								if (gotkey == CTRL_G || api->input(WIN_MID|WIN_SAV, 0, 0, "Find", search, sizeof(search), K_EDIT) > 0) {
-									for (j = (*cur) + 1; j != *cur; j++, j = option[j] == NULL ? 0 : j) {   /* a = search count */
+									for (j = (*cur) + 1; j != *cur; j++, j = (option[j] == NULL || !option[j][0]) ? 0 : j) {   /* a = search count */
 										if (strcasestr(option[j], search) != NULL) {
 											// Copy/pasted from search above.
 											if(y+(j-(*cur))+2>height+top) {