[poppler] poppler/Page.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Mon Jul 1 10:44:21 PDT 2013


 poppler/Page.cc |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 67129e9db88e8332907407f14d3e09ee5c49e274
Author: Jason Crain <jason at aquaticape.us>
Date:   Mon Jul 1 02:24:47 2013 -0500

    Check for NULL in Page::getResourceDictCopy

diff --git a/poppler/Page.cc b/poppler/Page.cc
index 426a15d..a7f3e2d 100644
--- a/poppler/Page.cc
+++ b/poppler/Page.cc
@@ -26,6 +26,7 @@
 // Copyright (C) 2008 Ilya Gorenbein <igorenbein at finjan.com>
 // Copyright (C) 2012 Fabio D'Urso <fabiodurso at hotmail.it>
 // Copyright (C) 2013 Thomas Freitag <Thomas.Freitag at alfa.de>
+// Copyright (C) 2013 Jason Crain <jason at aquaticape.us>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -363,7 +364,8 @@ Dict *Page::getResourceDict() {
 
 Dict *Page::getResourceDictCopy(XRef *xrefA) { 
   pageLocker();
-  return attrs->getResourceDict()->copy(xrefA);
+  Dict *dict = attrs->getResourceDict();
+  return dict ? dict->copy(xrefA) : NULL;
 }
 
 void Page::replaceXRef(XRef *xrefA) {


More information about the poppler mailing list