summaryrefslogtreecommitdiffstats
path: root/qthelper.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2015-07-31 22:25:43 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-03 22:19:36 -0700
commit260ea879e5c574350cc966551d161df829306560 (patch)
tree3064a2761587353ef46c4bec44ee7695e57cbb42 /qthelper.cpp
parentfaa1c281007b18a2b57bbb2642866598821b15c2 (diff)
downloadsubsurface-260ea879e5c574350cc966551d161df829306560.tar.gz
Make debugging cleaner
Don't try to connect the globe when NOMARBLE is active. Check exisistance before trying to open an image file. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qthelper.cpp')
-rw-r--r--qthelper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qthelper.cpp b/qthelper.cpp
index c6c7b9ef6..14a48c151 100644
--- a/qthelper.cpp
+++ b/qthelper.cpp
@@ -841,7 +841,7 @@ QByteArray hashFile(const QString filename)
{
QCryptographicHash hash(QCryptographicHash::Sha1);
QFile imagefile(filename);
- if (imagefile.open(QIODevice::ReadOnly)) {
+ if (imagefile.exists() && imagefile.open(QIODevice::ReadOnly)) {
hash.addData(&imagefile);
add_hash(filename, hash.result());
return hash.result();