When handing off a picture to a worker thread, copy it first

as otherwise we crash when the picture is freed before the
worker thread (to load from the net or to compute hashes)
is finished

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-03-15 21:31:59 +01:00 committed by Dirk Hohndel
parent 3c7e14a18f
commit 8a59d78faa
5 changed files with 30 additions and 6 deletions

View file

@ -14,6 +14,7 @@ class ImageDownloader : public QObject {
Q_OBJECT;
public:
ImageDownloader(struct picture *picture);
~ImageDownloader();
void load(bool fromHash);
private: