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>
This commit is contained in:
Robert C. Helling 2016-04-29 16:18:06 +02:00 committed by Dirk Hohndel
parent cae99471ad
commit 2e6588dc0e
2 changed files with 21 additions and 1 deletions

View file

@ -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);
}