summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/digikam/files/digikam-5.3.0-redeyes-crash.patch')
-rw-r--r--media-gfx/digikam/files/digikam-5.3.0-redeyes-crash.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/media-gfx/digikam/files/digikam-5.3.0-redeyes-crash.patch b/media-gfx/digikam/files/digikam-5.3.0-redeyes-crash.patch
new file mode 100644
index 000000000000..055f9be3acd1
--- /dev/null
+++ b/media-gfx/digikam/files/digikam-5.3.0-redeyes-crash.patch
@@ -0,0 +1,43 @@
+commit 1dad795deb0fbfcef5ad4932f7ade781d35ce17e
+Author: Maik Qualmann <metzpinguin@gmail.com>
+Date: Wed Nov 23 19:37:46 2016 +0100
+
+ fix not found shapepredictor.dat file
+ BUGS: 372831
+ FIXED-IN: 5.4.0
+
+diff --git a/libs/dimg/filters/redeye/redeyecorrectionfilter.cpp b/libs/dimg/filters/redeye/redeyecorrectionfilter.cpp
+index 1cbaefc..a834208 100644
+--- a/libs/dimg/filters/redeye/redeyecorrectionfilter.cpp
++++ b/libs/dimg/filters/redeye/redeyecorrectionfilter.cpp
+@@ -99,14 +99,14 @@ RedEyeCorrectionFilter::~RedEyeCorrectionFilter()
+
+ void RedEyeCorrectionFilter::filterImage()
+ {
+- if (d->sp == 0)
++ if (!d->sp)
+ {
+ // Loading the shape predictor model
+
+- QList<QString> path = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
+- QString::fromLatin1("digikam/facesengine"),
+- QStandardPaths::LocateDirectory);
+- QFile model(*path.begin() + QLatin1String("/ShapePredictor.dat"));
++ QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
++ QLatin1String("digikam/facesengine/shapepredictor.dat"));
++
++ QFile model(path);
+
+ if (model.open(QIODevice::ReadOnly))
+ {
+@@ -116,6 +116,10 @@ void RedEyeCorrectionFilter::filterImage()
+ dataStream >> *temp;
+ d->sp = temp;
+ }
++ else
++ {
++ return;
++ }
+ }
+
+ cv::Mat intermediateImage;