mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Fix possible crash in gift box sticker lookup.
This commit is contained in:
@@ -26,6 +26,8 @@ DocumentData *GiftBoxPack::lookup(int months) const {
|
||||
const auto fallback = _documents.empty() ? nullptr : _documents[0];
|
||||
if (it == begin(_localMonths)) {
|
||||
return fallback;
|
||||
} else if (it == end(_localMonths)) {
|
||||
return _documents.back();
|
||||
}
|
||||
const auto left = *(it - 1);
|
||||
const auto right = *it;
|
||||
|
||||
Reference in New Issue
Block a user