diff --git a/Telegram/SourceFiles/boxes/stickers_box.cpp b/Telegram/SourceFiles/boxes/stickers_box.cpp index ce2774c993..f7e842087f 100644 --- a/Telegram/SourceFiles/boxes/stickers_box.cpp +++ b/Telegram/SourceFiles/boxes/stickers_box.cpp @@ -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);