aboutsummaryrefslogtreecommitdiffstats
path: root/core/imagedownloader.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2016-04-29 16:18:06 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-29 09:08:20 -0700
commit2e6588dc0ef8d7698cc5dbe831f524a6e394145d (patch)
tree3041d78c15328fed0c3d3075cccb7e987a243c04 /core/imagedownloader.cpp
parentcae99471adc7532db34c365ee729a1ea7ffea204 (diff)
downloadsubsurface-2e6588dc0ef8d7698cc5dbe831f524a6e394145d.tar.gz
Protect access to image hash dictionaries with lock
Otherwise we step on our own feet when downloading several images, like after import from divelogs.de with many linked images. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/imagedownloader.cpp')
-rw-r--r--core/imagedownloader.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/imagedownloader.cpp b/core/imagedownloader.cpp
index f406ee45a..dc74a1e27 100644
--- a/core/imagedownloader.cpp
+++ b/core/imagedownloader.cpp
@@ -77,6 +77,8 @@ void ImageDownloader::saveImage(QNetworkReply *reply)
void loadPicture(struct picture *picture, bool fromHash)
{
+ if (!picture)
+ return;
ImageDownloader download(picture);
download.load(fromHash);
}