mirror of https://github.com/procxx/kepka.git
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());
|
ActiveCache().decrement(that->_data.size());
|
||||||
that->_data = _loader->bytes();
|
that->_data = _loader->bytes();
|
||||||
ActiveCache().increment(that->_data.size());
|
ActiveCache().increment(that->_data.size());
|
||||||
|
|
||||||
if (that->sticker()
|
if (that->sticker()
|
||||||
&& !that->sticker()->image
|
&& !that->sticker()->image
|
||||||
&& !_loader->imageData().isNull()) {
|
&& !_loader->imageData().isNull()) {
|
||||||
|
@ -856,12 +857,13 @@ bool DocumentData::loaded(FilePathResolveType type) const {
|
||||||
_loader->imageData()));
|
_loader->imageData()));
|
||||||
ActiveCache().increment(ComputeUsage(that->sticker()));
|
ActiveCache().increment(ComputeUsage(that->sticker()));
|
||||||
}
|
}
|
||||||
if (!that->_data.isEmpty() || that->getStickerLarge()) {
|
|
||||||
ActiveCache().up(that);
|
|
||||||
}
|
|
||||||
|
|
||||||
that->refreshGoodThumbnail();
|
that->refreshGoodThumbnail();
|
||||||
destroyLoader();
|
destroyLoader();
|
||||||
|
|
||||||
|
if (!that->_data.isEmpty() || that->getStickerLarge()) {
|
||||||
|
ActiveCache().up(that);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_owner->notifyDocumentLayoutChanged(this);
|
_owner->notifyDocumentLayoutChanged(this);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue