Description: Avoid an NPE in InlineStackingLM.applyChanges for Knuth elements with a null position
Bug: https://issues.apache.org/bugzilla/show_bug.cgi?id=50276
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649476
Origin: http://svn.apache.org/viewvc?view=revision&revision=1043871
Index: fop-1.0.dfsg2/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java
===================================================================
--- fop-1.0.dfsg2.orig/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java	2010-07-12 21:34:33.000000000 +0200
+++ fop-1.0.dfsg2/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java	2012-01-03 11:00:23.000000000 +0100
@@ -274,8 +274,9 @@
         KnuthElement oldElement;
         while (oldListIterator.hasNext()) {
             oldElement = (KnuthElement) oldListIterator.next();
-            oldElement.setPosition
-                (oldElement.getPosition().getPosition());
+            if (oldElement.getPosition() != null) {
+                oldElement.setPosition(oldElement.getPosition().getPosition());
+            }
         }
         // reset the iterator
         oldListIterator = oldList.listIterator();
