[poppler] PDFDoc->writeTrailer

Albert Astals Cid aacid at kde.org
Sat May 28 09:27:53 PDT 2011

A Saturday, May 28, 2011, Axel Strübing va escriure:
> 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.

Yeah the check for NULL is not needed, but yours is not needed afterwars 
either since the next line checks for isArray or not, so i'll just kill that 
NULL check.


> Please correct me if I am wrong and waisted someones time.
> --
> regards
> Axel

More information about the poppler mailing list