[poppler] poppler/PDFDoc.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Fri Nov 25 10:21:36 UTC 2016


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

New commits:
commit 5a04becc4940b926744e64d3b7d0355adcabf282
Author: Jakub Alba <jakubalba at gmail.com>
Date:   Fri Jun 17 13:41:39 2016 +0200

    Fix PDFDoc::saveIncrementalUpdate()'s detection of document being modified
    
    Bug 96561

diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index 587b2be..f28bdec 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -1028,7 +1028,9 @@ void PDFDoc::saveIncrementalUpdate (OutStream* outStr)
     }
   }
   xref->unlock();
-  if (uxref->getNumObjects() == 0) { //we have nothing to update
+  // because of "uxref->add(0, 65535, 0, gFalse);" uxref->getNumObjects() will
+  // always be >= 1; if it is 1, it means there is nothing to update
+  if (uxref->getNumObjects() == 1) {
     delete uxref;
     return;
   }


More information about the poppler mailing list