summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2018-10-16 23:01:18 +0900
committerSlávek Banko <slavek.banko@axis.cz>2018-10-17 03:15:25 +0200
commit66b6d940d964bc2c35b593e68f8c48db1df9c6bf (patch)
tree9c49e0b53f8a61973809df8b3d17835a992c8864
parent13633ade23731849a897f61af5b4f44bc01ea225 (diff)
downloadtdegraphics-66b6d940d964bc2c35b593e68f8c48db1df9c6bf.tar.gz
tdegraphics-66b6d940d964bc2c35b593e68f8c48db1df9c6bf.zip
Fixed konqueror crash related to pdf files. This resolves bug 2974.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit deb3e1e0eb0db3113a094d63216683431c98248d)
-rw-r--r--tdefile-plugins/dependencies/poppler-tqt/poppler-document.cc26
1 files changed, 12 insertions, 14 deletions
diff --git a/tdefile-plugins/dependencies/poppler-tqt/poppler-document.cc b/tdefile-plugins/dependencies/poppler-tqt/poppler-document.cc
index 69e0ee50..9584b104 100644
--- a/tdefile-plugins/dependencies/poppler-tqt/poppler-document.cc
+++ b/tdefile-plugins/dependencies/poppler-tqt/poppler-document.cc
@@ -169,13 +169,12 @@ TQString Document::getInfo( const TQString & type ) const
int i;
Dict *infoDict = info.getDict();
- if (
-# if defined(HAVE_POPPLER_058)
- infoDict->lookup( (char*)type.latin1() ).isString()
-# else
- infoDict->lookup( (char*)type.latin1(), &obj )->isString()
-# endif
- )
+#if defined(HAVE_POPPLER_058)
+ obj = infoDict->lookup( (char*)type.latin1() );
+#else
+ infoDict->lookup( (char*)type.latin1(), &obj );
+#endif
+ if (!obj.isNull() && obj.isString())
{
s1 = obj.getString();
if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getChar(1) & 0xff ) == 0xff )
@@ -241,13 +240,12 @@ TQDateTime Document::getDate( const TQString & type ) const
Dict *infoDict = info.getDict();
TQString result;
- if (
-# if defined(HAVE_POPPLER_058)
- infoDict->lookup( (char*)type.latin1() ).isString()
-# else
- infoDict->lookup( (char*)type.latin1(), &obj )->isString()
-# endif
- )
+#if defined(HAVE_POPPLER_058)
+ obj = infoDict->lookup( (char*)type.latin1() );
+#else
+ infoDict->lookup( (char*)type.latin1(), &obj );
+#endif
+ if (!obj.isNull() && obj.isString())
{
TQString s = UnicodeParsedString(obj.getString());
// TODO do something with the timezone information