Fix parse_sticker_set with an invalid sticker.
GitOrigin-RevId: 66734835e21c35fb3978f2311b9d582d1b65f0e6
This commit is contained in:
parent
61c883b971
commit
dcf3db3e98
@ -262,6 +262,9 @@ void StickersManager::parse_sticker_set(StickerSet *sticker_set, ParserT &parser
|
|||||||
if (parser.get_error() != nullptr) {
|
if (parser.get_error() != nullptr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!sticker_id.is_valid()) {
|
||||||
|
return parser.set_error("Receive invalid sticker in a sticker set");
|
||||||
|
}
|
||||||
sticker_set->sticker_ids.push_back(sticker_id);
|
sticker_set->sticker_ids.push_back(sticker_id);
|
||||||
|
|
||||||
Sticker *sticker = get_sticker(sticker_id);
|
Sticker *sticker = get_sticker(sticker_id);
|
||||||
|
Loading…
Reference in New Issue
Block a user