mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Attempt to fix crash in story preloading.
This commit is contained in:
@@ -54,6 +54,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
namespace {
|
||||
|
||||
constexpr auto kDefaultCoverThumbnailSize = 100;
|
||||
constexpr auto kMaxAllowedPreloadPrefix = 6 * 1024 * 1024;
|
||||
|
||||
const auto kLottieStickerDimensions = QSize(
|
||||
kStickerSideSize,
|
||||
@@ -393,7 +394,7 @@ void DocumentData::setattributes(
|
||||
if (data.is_round_message()) {
|
||||
_additional = std::make_unique<RoundData>();
|
||||
} else if (const auto size = data.vpreload_prefix_size()) {
|
||||
if (size->v > 0) {
|
||||
if (size->v > 0 && size->v < kMaxAllowedPreloadPrefix) {
|
||||
_videoPreloadPrefix = size->v;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user