[kaffe] CVS kaffe (riccardo): check for null peer

Kaffe CVS cvs-commits at kaffe.org
Fri Nov 10 09:20:55 PST 2006


PatchSet 7441 
Date: 2006/11/10 17:20:05
Author: riccardo
Branch: HEAD
Tag: (none) 
Log:
check for null peer

Members: 
	ChangeLog:1.4941->1.4942 
	libraries/javalib/awt-implementations/kaffe/java/awt/Component.java:1.18->1.19 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4941 kaffe/ChangeLog:1.4942
--- kaffe/ChangeLog:1.4941	Fri Nov 10 15:31:25 2006
+++ kaffe/ChangeLog	Fri Nov 10 17:20:05 2006
@@ -1,5 +1,10 @@
 2006-11-10  Riccardo Mottola <riccardo at kaffe.org>
 
+	* libraries/javalib/awt-implementations/kaffe/java/awt/Component.java:
+	check for null peer
+
+2006-11-10  Riccardo Mottola <riccardo at kaffe.org>
+
 	Implemented isLightweight for our AWT (returns false except for
 	Container, Canvas and Component)
 
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java:1.18 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java:1.19
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java:1.18	Fri Nov 10 15:31:26 2006
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java	Fri Nov 10 17:20:05 2006
@@ -3790,7 +3790,7 @@
     public void componentMoved(ComponentEvent event)
     {
         if (peer != null)
-            peer.setBounds(x, y, width, height);
+            peer.setBounds(x, y, width, height); // TODO implement this without the peer
     }
 
     /**
@@ -3800,8 +3800,11 @@
      */
     public void componentShown(ComponentEvent event)
     {
-        if (isShowing())
-            peer.show();
+    	if (peer != null)
+        {
+	    if (isShowing())
+                peer.show(); //TODO implement this without the peer
+	}
     }
 
     /**
@@ -3811,8 +3814,11 @@
      */
     public void componentHidden(ComponentEvent event)
     {
-        if (!isShowing())
-            peer.hide();
+        if (peer != null)
+	{
+            if (!isShowing())
+                peer.hide(); // TODO implement this without the peer
+        }
     }
 }
 




More information about the kaffe mailing list