diff -r 810b848e2e4f -r 9b8d61227169 ui/gtk/list.c --- a/ui/gtk/list.c Mon Apr 21 11:03:17 2025 +0200 +++ b/ui/gtk/list.c Mon Apr 21 19:32:57 2025 +0200 @@ -587,7 +587,12 @@ ObjWrapper *obj = obj_wrapper_new(value); // TODO: if index i is selected, the selection is lost // is it possible to update the item without removing it? - g_list_store_splice(view->liststore, i, 1, (void **)&obj, 1); + int count = g_list_model_get_n_items(G_LIST_MODEL(view->liststore)); + if(count <= i) { + g_list_store_splice(view->liststore, i, 0, (void **)&obj, 1); + } else { + g_list_store_splice(view->liststore, i, 1, (void **)&obj, 1); + } } } }