Fix possible crash with large UI scale values.

This commit is contained in:
John Preston 2023-07-21 14:42:26 +04:00
parent 863313531d
commit f8e8155452
2 changed files with 7 additions and 2 deletions

View File

@ -344,7 +344,12 @@ void CustomEmojiLoader::check() {
sizeOverride);
};
auto put = [=, key = cacheKey(document)](QByteArray value) {
document->owner().cacheBigFile().put(key, std::move(value));
const auto size = value.size();
if (size <= Storage::Cache::Database::Settings().maxDataSize) {
document->owner().cacheBigFile().put(key, std::move(value));
} else {
LOG(("Data Error: Cached emoji size too big: %1.").arg(size));
}
};
const auto type = document->sticker()->type;
auto generator = [=, bytes = Lottie::ReadContent(data, filepath)]()

@ -1 +1 @@
Subproject commit 288bec7157bf654d121ebfd2828801b49beb34ec
Subproject commit 39d440f774b5b0986200299c4893e3f6a4678c85