summaryrefslogtreecommitdiffstats
path: root/core/qthelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/qthelper.cpp')
-rw-r--r--core/qthelper.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp
index 703e4e615..e7bf7dcf4 100644
--- a/core/qthelper.cpp
+++ b/core/qthelper.cpp
@@ -1190,11 +1190,9 @@ void hashPicture(struct picture *picture)
{
if (!picture)
return;
- char *oldHash = copy_string(picture->hash);
- learnHash(picture, hashFile(localFilePath(picture->filename)));
- if (!empty_string(picture->hash) && !same_string(picture->hash, oldHash))
+ QByteArray hash = hashFile(localFilePath(picture->filename));
+ if (!hash.isNull() && !same_string(hash.toHex().data(), picture->hash))
mark_divelist_changed(true);
- free(oldHash);
picture_free(picture);
}