sortlistmodel: Fix a crash

This commit is contained in:
Matthias Clasen 2020-07-24 10:40:55 -04:00
parent c85e424279
commit f7b73b2e01

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]);