Avoid NPE if intermediate XML was generated in accessibility mode but not the PDF

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Accessibility@828754 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vincent Hennebert 2009-10-22 15:40:38 +00:00
parent 444ea54c14
commit f656784237

View File

@ -112,7 +112,8 @@ public class PDFDocumentNavigationHandler implements IFDocumentNavigationHandler
targetRect2D, pdfAction);
if (pdfLink != null) {
String ptr = link.getAction().getStructurePointer();
if (ptr != null && ptr.length() > 0) {
if (documentHandler.getUserAgent().isAccessibilityEnabled()
&& ptr != null && ptr.length() > 0) {
documentHandler.getLogicalStructureHandler().addLinkContentItem(pdfLink, ptr);
}
documentHandler.currentPage.addAnnotation(pdfLink);