Browse Source

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
pull/30/head
William Victor Mote 21 years ago
parent
commit
29bf2f3126

+ 1
- 1
src/java/org/apache/fop/apps/Document.java View File

@@ -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

+ 3
- 0
src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java View File

@@ -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++) {

Loading…
Cancel
Save