40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
|
commit 573069e8cd3b7155582e0c7be3625c0cc4879619
|
||
|
Author: Gilles Caulier <caulier.gilles@gmail.com>
|
||
|
Date: Tue Sep 23 09:49:20 2014 +0200
|
||
|
|
||
|
Handle right libkexiv2 version to extract preview and prevent crash in Exiv2 preview extractor.
|
||
|
CCBUGS: 339144
|
||
|
|
||
|
diff --git a/core/libs/threadimageio/thumbnailcreator.cpp b/core/libs/threadimageio/thumbnailcreator.cpp
|
||
|
index ed07d0d..9f238a4 100644
|
||
|
--- a/core/libs/threadimageio/thumbnailcreator.cpp
|
||
|
+++ b/core/libs/threadimageio/thumbnailcreator.cpp
|
||
|
@@ -62,6 +62,7 @@
|
||
|
|
||
|
#include <libkexiv2/kexiv2previews.h>
|
||
|
#include <libkexiv2/rotationmatrix.h>
|
||
|
+#include <libkexiv2/version.h>
|
||
|
|
||
|
// Local includes
|
||
|
|
||
|
@@ -519,6 +520,9 @@ ThumbnailImage ThumbnailCreator::createT
|
||
|
KDcraw::loadHalfPreview(qimage, path);
|
||
|
}
|
||
|
|
||
|
+ // See bug #339144 : only handle preview if right libkexiv2 version is used.
|
||
|
+#if KEXIV2_VERSION >= 0x020302
|
||
|
+
|
||
|
// Special case with DNG file. See B.K.O #338081
|
||
|
if (qimage.isNull())
|
||
|
{
|
||
|
@@ -528,6 +532,9 @@ ThumbnailImage ThumbnailCreator::createT
|
||
|
qimage = preview.image();
|
||
|
}
|
||
|
|
||
|
+
|
||
|
+#endif
|
||
|
+
|
||
|
// DImg-dependent loading methods: TIFF, PNG, everything supported by QImage
|
||
|
if (qimage.isNull() && !failedAtDImg)
|
||
|
{
|