UserModel: check indices are inside the user list
authorKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 08:40:28 +0000 (09:40 +0100)
committerKevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com>
Tue, 15 Dec 2020 08:43:32 +0000 (08:43 +0000)
commitd6400764549cf62eecd1ea58847aa2f640b88ba7
treedb53d7e02dd76ffe7c496bb4a9adc7a5a4ac2877
parent94c4e3044ccad2d8ccc83554d7224e0dbc0a8320
UserModel: check indices are inside the user list

The model was just checking for the user list being empty or not which
is overly optimistic. Indeed there might be cases where the id is
actually outside the boundaries so properly check for this.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
src/gui/tray/UserModel.cpp