2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 14:17:45 +00:00

Fix a crash in case of corrupt local data.

This commit is contained in:
John Preston
2021-04-14 09:45:51 +04:00
parent 6cbee72b8a
commit cf6dbfaf55
2 changed files with 2 additions and 1 deletions

View File

@@ -149,6 +149,7 @@ DocumentData *Document::readFromStreamHelper(
if ((stream.status() != QDataStream::Ok) if ((stream.status() != QDataStream::Ok)
|| (!dc && !access) || (!dc && !access)
|| !thumb || !thumb
|| !videoThumb
|| (thumb->valid() || (thumb->valid()
&& (!storage || !storage->isDocumentThumbnail()))) { && (!storage || !storage->isDocumentThumbnail()))) {
stream.setStatus(QDataStream::ReadCorruptData); stream.setStatus(QDataStream::ReadCorruptData);