Fix picture hashing logic for pictures on the web.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2016-12-15 14:31:20 +01:00
parent ca1349241b
commit 10b8bda662
2 changed files with 7 additions and 1 deletions

View file

@ -100,6 +100,8 @@ SHashedImage::SHashedImage(struct picture *picture) : QImage()
// This did not load anything. Let's try to get the image from other sources
// Let's try to load it locally via its hash
QString filename = fileFromHash(picture->hash);
if (filename.isNull())
filename = QString(picture->filename);
if (filename.isNull()) {
// That didn't produce a local filename.
// Try the cloud server