summaryrefslogtreecommitdiff
path: root/java/awt/ScrollPaneAdjustable.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/awt/ScrollPaneAdjustable.java')
-rw-r--r--java/awt/ScrollPaneAdjustable.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/java/awt/ScrollPaneAdjustable.java b/java/awt/ScrollPaneAdjustable.java
index cfca19b44..bec5b5106 100644
--- a/java/awt/ScrollPaneAdjustable.java
+++ b/java/awt/ScrollPaneAdjustable.java
@@ -87,12 +87,16 @@ public class ScrollPaneAdjustable
public void addAdjustmentListener (AdjustmentListener listener)
{
- AWTEventMulticaster.add (adjustmentListener, listener);
+ if (listener == null)
+ return;
+ adjustmentListener = AWTEventMulticaster.add (adjustmentListener, listener);
}
public void removeAdjustmentListener (AdjustmentListener listener)
{
- AWTEventMulticaster.remove (adjustmentListener, listener);
+ if (listener == null)
+ return;
+ adjustmentListener = AWTEventMulticaster.remove (adjustmentListener, listener);
}
public AdjustmentListener[] getAdjustmentListeners ()