Fix crash in archived stickers loading.

Fixes #17297.
This commit is contained in:
John Preston 2021-11-30 09:29:28 +04:00
parent 234ff3ba37
commit 94bec3b574
1 changed files with 1 additions and 1 deletions

View File

@ -492,7 +492,7 @@ void StickersBox::getArchivedDone(
const auto index = archived.indexOf(set->id);
if (archived.isEmpty() || index != archived.size() - 1) {
changedSets = true;
if (index < archived.size() - 1) {
if (index >= 0 && index < archived.size() - 1) {
archived.removeAt(index);
}
archived.push_back(set->id);