From 4962a780f1f030ca84451a59edf87cff436e9aea Mon Sep 17 00:00:00 2001 From: Jakub Kucharski Date: Fri, 17 Jun 2016 13:41:39 +0200 Subject: [PATCH] Fix PDFDoc::saveIncrementalUpdate()'s detection of document being modified Bug 96561 --- poppler/PDFDoc.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc index c91d6e4..e912d85 100644 --- a/poppler/PDFDoc.cc +++ b/poppler/PDFDoc.cc @@ -1021,7 +1021,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; } -- 2.9.0