mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
More strict check for custom emoji dimensions.
This commit is contained in:
parent
66afcbdae8
commit
bb31357c58
2 changed files with 2 additions and 3 deletions
|
@ -483,8 +483,7 @@ bool DocumentData::checkWallPaperProperties() {
|
||||||
}
|
}
|
||||||
if (type != FileDocument
|
if (type != FileDocument
|
||||||
|| !hasThumbnail()
|
|| !hasThumbnail()
|
||||||
|| !dimensions.width()
|
|| dimensions.isEmpty()
|
||||||
|| !dimensions.height()
|
|
||||||
|| dimensions.width() > Storage::kMaxWallPaperDimension
|
|| dimensions.width() > Storage::kMaxWallPaperDimension
|
||||||
|| dimensions.height() > Storage::kMaxWallPaperDimension
|
|| dimensions.height() > Storage::kMaxWallPaperDimension
|
||||||
|| size > Storage::kMaxWallPaperInMemory) {
|
|| size > Storage::kMaxWallPaperInMemory) {
|
||||||
|
|
|
@ -414,7 +414,7 @@ Ui::CustomEmoji::Preview CustomEmojiLoader::preview() {
|
||||||
const auto make = [&](not_null<DocumentData*> document) -> Preview {
|
const auto make = [&](not_null<DocumentData*> document) -> Preview {
|
||||||
const auto dimensions = document->dimensions;
|
const auto dimensions = document->dimensions;
|
||||||
if (!document->inlineThumbnailIsPath()
|
if (!document->inlineThumbnailIsPath()
|
||||||
|| !dimensions.width()) {
|
|| dimensions.isEmpty()) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
const auto scale = (FrameSizeFromTag(_tag, _sizeOverride) * 1.)
|
const auto scale = (FrameSizeFromTag(_tag, _sizeOverride) * 1.)
|
||||||
|
|
Loading…
Add table
Reference in a new issue