Here is what works for me. I'll submit it also upstream.

-- 
Mathieu
Index: src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java
===================================================================
--- src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java	(revision 917433)
+++ src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java	(working copy)
@@ -288,6 +288,11 @@
         while (oldListIterator.hasNext()) {
             oldElement = (KnuthElement) oldListIterator.next();
             currLM = (InlineLevelLayoutManager) oldElement.getLayoutManager();
+            // This can occur if a fo:inline element is empty but has an id
+            // attribute on it.  Punt in that case.
+            if (currLM == null) {
+            	continue;
+            }
             // initialize prevLM
             if (prevLM == null) {
                 prevLM = currLM;
@@ -358,6 +363,9 @@
         while (oldListIterator.hasNext()) {
             oldElement = (KnuthElement) oldListIterator.next();
             currLM = (InlineLevelLayoutManager) oldElement.getLayoutManager();
+            if (currLM == null) {
+            	continue;
+            }
             if (prevLM == null) {
                 prevLM = currLM;
             }

Reply via email to