diff --git a/src/uifc/uifc32.c b/src/uifc/uifc32.c
index 90a1184e69c5125e894b80cda45bab278f4feefe..af66fe15260b57ae75f726217eaaf184125dd988 100644
--- a/src/uifc/uifc32.c
+++ b/src/uifc/uifc32.c
@@ -535,7 +535,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
 	if(mode&WIN_EDIT) bline|=BL_EDIT;
 	if(api->bottomline != NULL)
 		api->bottomline(bline);
-	while(opts<MAX_OPTS)
+	while(option!=NULL && opts<MAX_OPTS)
 		if(option[opts]==NULL || option[opts][0]==0)
 			break;
 		else opts++;