summaryrefslogtreecommitdiffstats
path: root/helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'helper.cpp')
-rw-r--r--helper.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/helper.cpp b/helper.cpp
index 32dc11c..9398a06 100644
--- a/helper.cpp
+++ b/helper.cpp
@@ -304,9 +304,13 @@ namespace Helper {
QVariant picSize(const QString &path){
Magick::Image img;
- img.ping(qPrintable(path));
- QString retval = QString("%1x%2").arg(QString::number(img.columns()), QString::number(img.rows()));
- return retval;
+ try {
+ img.ping(qPrintable(path));
+ QString retval = QString("%1x%2").arg(QString::number(img.columns()), QString::number(img.rows()));
+ return retval;
+ } catch(...) {
+ return QVariant();
+ }
}
PicData convertArchivefileToPng(PicData data){