From a806e6360ab5f703dfd15e8565e3b456f800cd8b Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 3 May 2006 08:30:56 +0000 Subject: Bugzilla #38243: Bugfix for NPE when there are gaps in the table-column setup. Submitted by: Gerhard Oettl git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@399200 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/layoutmgr/table/ColumnSetup.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/java/org/apache') diff --git a/src/java/org/apache/fop/layoutmgr/table/ColumnSetup.java b/src/java/org/apache/fop/layoutmgr/table/ColumnSetup.java index 00784fc5c..7b5db7df0 100644 --- a/src/java/org/apache/fop/layoutmgr/table/ColumnSetup.java +++ b/src/java/org/apache/fop/layoutmgr/table/ColumnSetup.java @@ -1,5 +1,5 @@ /* - * Copyright 2005 The Apache Software Foundation. + * Copyright 2005-2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,9 +61,10 @@ public class ColumnSetup { ListIterator iter = rawCols.listIterator(); while (iter.hasNext()) { TableColumn col = (TableColumn)iter.next(); - if (col != null) { - colnum = col.getColumnNumber(); + if (col == null) { + continue; } + colnum = col.getColumnNumber(); for (int i = 0; i < col.getNumberColumnsRepeated(); i++) { while (colnum > columns.size()) { columns.add(null); -- cgit v1.2.3