From d69d328aaca71d8f9bb4b74b36cba92175425e98 Mon Sep 17 00:00:00 2001 From: Jakub Alba 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 ed2dbba..e88ddb7 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; } -- 2.10.1