diff options
author | William Victor Mote <vmote@apache.org> | 2003-08-26 19:28:46 +0000 |
---|---|---|
committer | William Victor Mote <vmote@apache.org> | 2003-08-26 19:28:46 +0000 |
commit | 3dc29109cca3fdd61f44d0a9a5cec4f044944c90 (patch) | |
tree | af2bbff13b6c6f49ce7f0b6c0f276fb60701b0a8 /src/java/org | |
parent | a87f3f9fa357a249e044a8769b46639423b1cdb0 (diff) | |
download | xmlgraphics-fop-3dc29109cca3fdd61f44d0a9a5cec4f044944c90.tar.gz xmlgraphics-fop-3dc29109cca3fdd61f44d0a9a5cec4f044944c90.zip |
don't try to create bookmarks in output unless there are some in the input (getting NPE)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196847 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r-- | src/java/org/apache/fop/apps/Document.java | 2 | ||||
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/apps/Document.java b/src/java/org/apache/fop/apps/Document.java index 6411126de..e7b9dc07c 100644 --- a/src/java/org/apache/fop/apps/Document.java +++ b/src/java/org/apache/fop/apps/Document.java @@ -101,7 +101,7 @@ public class Document implements FOTreeControl, FOTreeListener { public AreaTree areaTree; public AreaTreeModel atModel; - private Bookmarks bookmarks; + private Bookmarks bookmarks = null; /** * Main constructor diff --git a/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java b/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java index 5fa806dc3..ac59651cd 100644 --- a/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java +++ b/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java @@ -139,6 +139,9 @@ public class LayoutManagerLS extends LayoutStrategy { * the extension to the area tree. */ public void addBookmarksToAreaTree() { + if (document.getBookmarks() == null) { + return; + } document.getDriver().getLogger().debug("adding bookmarks to area tree"); BookmarkData data = new BookmarkData(); for (int count = 0; count < document.getBookmarks().getOutlines().size(); count++) { |