mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-26 16:43:33 +00:00
Fix crash on bad sticker.
DocumentData::getStickerLarge and DocumentData::loaded go to a loop.
This commit is contained in:
parent
26f1ade5ba
commit
45fda44924
@ -845,6 +845,7 @@ bool DocumentData::loaded(FilePathResolveType type) const {
|
||||
ActiveCache().decrement(that->_data.size());
|
||||
that->_data = _loader->bytes();
|
||||
ActiveCache().increment(that->_data.size());
|
||||
|
||||
if (that->sticker()
|
||||
&& !that->sticker()->image
|
||||
&& !_loader->imageData().isNull()) {
|
||||
@ -856,12 +857,13 @@ bool DocumentData::loaded(FilePathResolveType type) const {
|
||||
_loader->imageData()));
|
||||
ActiveCache().increment(ComputeUsage(that->sticker()));
|
||||
}
|
||||
if (!that->_data.isEmpty() || that->getStickerLarge()) {
|
||||
ActiveCache().up(that);
|
||||
}
|
||||
|
||||
that->refreshGoodThumbnail();
|
||||
destroyLoader();
|
||||
|
||||
if (!that->_data.isEmpty() || that->getStickerLarge()) {
|
||||
ActiveCache().up(that);
|
||||
}
|
||||
}
|
||||
_owner->notifyDocumentLayoutChanged(this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user