[poppler] Branch 'poppler-0.24' - qt4/src qt5/src
Albert Astals Cid
aacid at kemper.freedesktop.org
Wed Oct 9 17:18:44 PDT 2013
qt4/src/poppler-document.cc | 6 ++++++
qt5/src/poppler-document.cc | 6 ++++++
2 files changed, 12 insertions(+)
New commits:
commit daa0990a7baf17d00d12574a4de815e070727a86
Author: Albert Astals Cid <aacid at kde.org>
Date: Thu Oct 10 02:16:25 2013 +0200
Return empty if getXRef()->copy() fails
Seems this can happen by looking at the backtrace in https://bugs.kde.org/show_bug.cgi?id=325810
diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc
index 7d13656..6a06ab8 100644
--- a/qt4/src/poppler-document.cc
+++ b/qt4/src/poppler-document.cc
@@ -269,6 +269,8 @@ namespace Poppler {
return QString();
QScopedPointer<XRef> xref(m_doc->doc->getXRef()->copy());
+ if (!xref)
+ return QString();
xref->getDocInfo(&info);
if ( !info.isDict() )
return QString();
@@ -300,6 +302,8 @@ namespace Poppler {
return QStringList();
QScopedPointer<XRef> xref(m_doc->doc->getXRef()->copy());
+ if (!xref)
+ return QStringList();
xref->getDocInfo(&info);
if ( !info.isDict() )
return QStringList();
@@ -323,6 +327,8 @@ namespace Poppler {
Object info;
QScopedPointer<XRef> xref(m_doc->doc->getXRef()->copy());
+ if (!xref)
+ return QDateTime();
xref->getDocInfo(&info);
if ( !info.isDict() ) {
info.free();
diff --git a/qt5/src/poppler-document.cc b/qt5/src/poppler-document.cc
index af1804e..158d506 100644
--- a/qt5/src/poppler-document.cc
+++ b/qt5/src/poppler-document.cc
@@ -255,6 +255,8 @@ namespace Poppler {
return QString();
QScopedPointer<XRef> xref(m_doc->doc->getXRef()->copy());
+ if (!xref)
+ return QString();
xref->getDocInfo(&info);
if ( !info.isDict() )
return QString();
@@ -286,6 +288,8 @@ namespace Poppler {
return QStringList();
QScopedPointer<XRef> xref(m_doc->doc->getXRef()->copy());
+ if (!xref)
+ return QStringList();
xref->getDocInfo(&info);
if ( !info.isDict() )
return QStringList();
@@ -309,6 +313,8 @@ namespace Poppler {
Object info;
QScopedPointer<XRef> xref(m_doc->doc->getXRef()->copy());
+ if (!xref)
+ return QDateTime();
xref->getDocInfo(&info);
if ( !info.isDict() ) {
info.free();
More information about the poppler
mailing list