diff options
Diffstat (limited to 'src/java/org/apache/fop/render/pdf')
-rw-r--r-- | src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java b/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java index 2f2de2e62..2a9a07534 100644 --- a/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java +++ b/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java @@ -25,6 +25,9 @@ import java.awt.geom.Rectangle2D; import java.util.Iterator; import java.util.Map; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + import org.apache.fop.pdf.PDFAction; import org.apache.fop.pdf.PDFDocument; import org.apache.fop.pdf.PDFFactory; @@ -42,9 +45,6 @@ import org.apache.fop.render.intermediate.extensions.NamedDestination; import org.apache.fop.render.intermediate.extensions.URIAction; import org.apache.fop.render.pdf.PDFDocumentHandler.PageReference; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - /** * Implementation of the {@link IFDocumentNavigationHandler} interface for PDF output. */ @@ -116,7 +116,7 @@ public class PDFDocumentNavigationHandler implements IFDocumentNavigationHandler if (pdfLink != null) { //accessibility: ptr has a value String ptr = link.getAction().getPtr(); - if (ptr.length() > 0) { + if (ptr != null && ptr.length() > 0) { this.documentHandler.addLinkToStructElem(ptr, pdfLink); int id = this.documentHandler.getPageLinkCountPlusPageParentKey(); pdfLink.setStructParent(id); |