diff options
Diffstat (limited to 'libjava/javax/swing/RepaintManager.java')
-rw-r--r-- | libjava/javax/swing/RepaintManager.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libjava/javax/swing/RepaintManager.java b/libjava/javax/swing/RepaintManager.java index 05b974f..8910bf5 100644 --- a/libjava/javax/swing/RepaintManager.java +++ b/libjava/javax/swing/RepaintManager.java @@ -431,6 +431,9 @@ public class RepaintManager if (damaged.width == 0 || damaged.height == 0) continue; JRootPane root = comp.getRootPane(); + // If the component has no root, no repainting will occur. + if (root == null) + continue; Rectangle rootDamage = SwingUtilities.convertRectangle(comp, damaged, root); if (! roots.containsKey(root)) { @@ -450,7 +453,7 @@ public class RepaintManager Map.Entry ent = (Map.Entry) i.next(); JRootPane root = (JRootPane) ent.getKey(); Rectangle rect = (Rectangle) ent.getValue(); - root.paintImmediately(rect); + root.paintImmediately(rect); } } |