[poppler] PDFDoc->writeTrailer

Axel Strübing axel.struebing at freenet.de
Sat May 28 07:20:52 PDT 2011


Dear popplers

there seems to be a glitch in PDFDoc::writeTrailer.

For incremental updates 
if(xref->getTrailerDict()->getDict()->lookup("ID", &obj4) != NULL) {
is checked but this call never returns NULL but a pointer to Object (the 
Object being the NullObject or whatever)

IMHO the correct line would be:
if( ! xref->getTrailerDict()->getDict()->lookup("ID", &obj4)->isNull() ) {

This saved me the observed warning.
I attach a the patch to PDFDoc.cc.

Please correct me if I am wrong and waisted someones time.
--
regards
Axel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PDFDoc.patch
Type: text/x-patch
Size: 481 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110528/2654afc0/attachment.bin>


More information about the poppler mailing list