Always try to fetch mask_position.

This commit is contained in:
levlam 2022-07-21 15:54:43 +03:00
parent 52214f37bc
commit 310c4d1b6a

View File

@ -6201,7 +6201,6 @@ tl_object_ptr<telegram_api::inputStickerSetItem> StickersManager::get_input_stic
auto input_document = file_view.main_remote_location().as_input_document(); auto input_document = file_view.main_remote_location().as_input_document();
tl_object_ptr<telegram_api::maskCoords> mask_coords; tl_object_ptr<telegram_api::maskCoords> mask_coords;
if (::td::get_sticker_type(sticker->type_) == StickerType::Mask) {
auto mask_position = sticker->mask_position_.get(); auto mask_position = sticker->mask_position_.get();
if (mask_position != nullptr && mask_position->point_ != nullptr) { if (mask_position != nullptr && mask_position->point_ != nullptr) {
auto point = [mask_point_id = mask_position->point_->get_id()] { auto point = [mask_point_id = mask_position->point_->get_id()] {
@ -6222,7 +6221,6 @@ tl_object_ptr<telegram_api::inputStickerSetItem> StickersManager::get_input_stic
mask_coords = make_tl_object<telegram_api::maskCoords>(point, mask_position->x_shift_, mask_position->y_shift_, mask_coords = make_tl_object<telegram_api::maskCoords>(point, mask_position->x_shift_, mask_position->y_shift_,
mask_position->scale_); mask_position->scale_);
} }
}
int32 flags = 0; int32 flags = 0;
if (mask_coords != nullptr) { if (mask_coords != nullptr) {