diff options
author | Roman Kennke <roman@kennke.org> | 2006-05-04 13:20:44 +0000 |
---|---|---|
committer | Roman Kennke <roman@kennke.org> | 2006-05-04 13:20:44 +0000 |
commit | 6048f1c7d58bade35dc77836dd4973228c940263 (patch) | |
tree | d9b72eb48f77468547cb1edc467fd52b77393822 | |
parent | df5ec956858ca58dc3bf9edc55653b3188e01af5 (diff) | |
download | classpath-6048f1c7d58bade35dc77836dd4973228c940263.tar.gz |
2006-05-04 Roman Kennke <kennke@aicas.com>
* javax/swing/JComponent.java
(paint): Added null check to avoid NPE when clip == null.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | javax/swing/JComponent.java | 5 |
2 files changed, 8 insertions, 2 deletions
@@ -1,5 +1,10 @@ 2006-05-04 Roman Kennke <kennke@aicas.com> + * javax/swing/JComponent.java + (paint): Added null check to avoid NPE when clip == null. + +2006-05-04 Roman Kennke <kennke@aicas.com> + * javax/swing/AbstractButton.java (addImpl): New method. Installs an OverlayLayout if no other layout has been installed before. diff --git a/javax/swing/JComponent.java b/javax/swing/JComponent.java index f8d82c736..d916d0583 100644 --- a/javax/swing/JComponent.java +++ b/javax/swing/JComponent.java @@ -1764,8 +1764,9 @@ public abstract class JComponent extends Container implements Serializable paintBorder(g2); paintChildren(g2); Rectangle clip = g2.getClipBounds(); - if (clip.x == 0 && clip.y == 0 && clip.width == getWidth() - && clip.height == getHeight()) + if (clip == null + || (clip.x == 0 && clip.y == 0 && clip.width == getWidth() + && clip.height == getHeight())) RepaintManager.currentManager(this).markCompletelyClean(this); } } |