progwolff added a comment.
In https://phabricator.kde.org/D8415#158804, @aacid wrote: > Wouldn't it make more sense to fix this in QImageReader and not in every user of QImageReader ? From my perspective the behaviour of QImageReader is correct. QImage::read docs: > Reads an image from the device into image, which must point to a QImage. Returns true on success; otherwise, returns false. QImage::isNull docs: > Returns true if it is a null image, otherwise returns false. > A null image has all parameters set to zero and no allocated data. It seems totally possible that an empty image file is read correctly. In this case read returns true, but the resulting image is a null image. For this patch I would however prefer a new error message, something like "the loaded document is empty". REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D8415 To: trufanov, ngraham, #okular Cc: aacid, progwolff