summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--javax/swing/tree/VariableHeightLayoutCache.java6
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f6c3a608c..ab44b787a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-04 Roman Kennke <kennke@aicas.com>
+
+ * javax/swing/tree/VariableHeightLayoutCache.java
+ (getBounds): When rect is null, create a new Rectangle.
+
2006-10-04 Christian Thalinger <twisti@complang.tuwien.ac.at>
* native/jni/java-nio/javanio.c (cpnio_read, cpnio_readv)
diff --git a/javax/swing/tree/VariableHeightLayoutCache.java b/javax/swing/tree/VariableHeightLayoutCache.java
index 1b85fb13d..4d5309fac 100644
--- a/javax/swing/tree/VariableHeightLayoutCache.java
+++ b/javax/swing/tree/VariableHeightLayoutCache.java
@@ -339,6 +339,12 @@ public class VariableHeightLayoutCache
return null;
if (dirty)
update();
+
+ // The RI allows null arguments for rect, in which case a new Rectangle
+ // is created.
+ if (rect == null)
+ rect = new Rectangle();
+
Object last = path.getLastPathComponent();
NodeRecord r = (NodeRecord) nodes.get(last);
if (r == null)