> Currently the gambas PDF viewer segfaults when loading this PDF.
> The PDF probably has a corrupted index, but I think gambas could deal with
> more gracefully (by not displaying the index, but still the pages of the
> PDF) which is what other poppler-based tools can do.
>
> This patch (to both the pdf component and the example viewer) fixes the
> issue.
>
> Ian Haywood

Thanks for the patch. 

I didn't use them, because actually the problem is only in PdfDocument.cpp, 
which did not check that the getDest() method could return NULL.

I modified PdfDocument.cpp to check the return value of getDest() everywhere. 

To fix the PdfViewer example error, I modified The PdfDocument.HasIndex 
property, the PdfIndex.HasChildren property and the PdfIndex.MoveChild() 
method to take into account that having an index with zero elements is the 
same thing as having no index.

The fix is in revision #1899 (Gambas 2) and #1900 (Gambas 3)

Best regards,

-- 
Benoît


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to