summaryrefslogtreecommitdiffstats
path: root/core/imagedownloader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/imagedownloader.cpp')
-rw-r--r--core/imagedownloader.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/imagedownloader.cpp b/core/imagedownloader.cpp
index 05900c40d..cdaa7fc90 100644
--- a/core/imagedownloader.cpp
+++ b/core/imagedownloader.cpp
@@ -86,8 +86,10 @@ static void loadPicture(struct picture *picture, bool fromHash)
if (!picture)
return;
QMutexLocker locker(&pictureQueueMutex);
- if (queuedPictures.contains(QString(picture->filename)))
+ if (queuedPictures.contains(QString(picture->filename))) {
+ picture_free(picture);
return;
+ }
queuedPictures.insert(QString(picture->filename));
locker.unlock();