diff options
Diffstat (limited to 'javax/swing/tree/VariableHeightLayoutCache.java')
-rw-r--r-- | javax/swing/tree/VariableHeightLayoutCache.java | 6 |
1 files changed, 6 insertions, 0 deletions
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) |