sortlistmodel: Fix a crash

This commit is contained in:
Matthias Clasen
2020-07-24 10:40:55 -04:00
parent 67fdc4f533
commit 16d09f154e

View File

@@ -148,6 +148,9 @@ gtk_sort_list_model_get_item (GListModel *list,
if (self->model == NULL)
return NULL;
if (position >= self->n_items)
return NULL;
if (self->positions)
position = pos_from_key (self, self->positions[position]);