Index: uspace/lib/ui/src/list.c
===================================================================
--- uspace/lib/ui/src/list.c	(revision 8a4ceaa18d4887f34b4452ea99ba93c9651a919d)
+++ uspace/lib/ui/src/list.c	(revision a77c7224b90f4d4f935f65b6d6ff3f75fb8b9d0a)
@@ -738,5 +738,7 @@
 void ui_list_entry_delete(ui_list_entry_t *entry)
 {
-	/* Try to make sure entry does not disappear between cursor and page */
+	ui_list_t *list = entry->list;
+
+	/* Try to make sure entry does not disappear under cursor or page */
 	if (entry->list->cursor == entry)
 		ui_list_cursor_up(entry->list);
@@ -749,4 +751,31 @@
 
 	ui_list_entry_destroy(entry);
+
+	/*
+	 * But it could still happen if there are not enough entries.
+	 * In that case just move page and/or cursor to the first
+	 * entry.
+	 */
+	if (list->page == NULL) {
+		list->page = ui_list_first(list);
+		list->page_idx = 0;
+	} else {
+		/*
+		 * Entry index might have changed if earlier entry
+		 * was deleted.
+		 */
+		list->page_idx = ui_list_entry_get_idx(list->page);
+	}
+
+	if (list->cursor == NULL) {
+		list->cursor = ui_list_first(list);
+		list->cursor_idx = 0;
+	} else {
+		/*
+		 * Entry index might have changed if earlier entry
+		 * was deleted.
+		 */
+		list->cursor_idx = ui_list_entry_get_idx(list->cursor);
+	}
 }
 
