Author: jeremias
Date: Thu Apr 16 09:07:23 2009
New Revision: 765524

URL: http://svn.apache.org/viewvc?rev=765524&view=rev
Log:
Fixed a possible NPE when intermediate content is parsed and navigation 
elements are present.

Modified:
    
xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java

Modified: 
xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java?rev=765524&r1=765523&r2=765524&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java
 Thu Apr 16 09:07:23 2009
@@ -25,6 +25,9 @@
 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.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 @@
         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);



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to