changeset 300:d09295052fb9

RT-18809: NPE in GridPaneDesignInfo.getCellBounds().
author Kinsley Wong
date Mon, 23 Jan 2012 10:56:28 -0800
parents ef14df9bc8ed
children fc6c5cf966c4
files javafx-designtime/src/javafx/scene/layout/GridPaneDesignInfo.java
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-designtime/src/javafx/scene/layout/GridPaneDesignInfo.java	Sun Jan 22 16:45:21 2012 -0800
+++ b/javafx-designtime/src/javafx/scene/layout/GridPaneDesignInfo.java	Mon Jan 23 10:56:28 2012 -0800
@@ -72,6 +72,9 @@
 
         // Compute row height
         double[] rowHeights = pane.getRowHeights();
+        if (rowHeights == null) {
+            rowHeights = new double[] {0};
+        }
         double minY = top;
         double height = rowHeights[rowIndex];
 
@@ -81,6 +84,9 @@
 
         // Compute column width
         double[] columnWidths = pane.getColumnWidths();
+        if (columnWidths == null) {
+            columnWidths = new double[] {0};
+        }
         double minX = left;
         double width = columnWidths[columnIndex];