Fixes for ICQJava

Pavel Roskin pavel_roskin at geocities.com
Tue Apr 20 09:43:46 PDT 1999


Hello!

I'm sending two patches preventing NullPointerExceptions in ICQJava while
registering a new user.

There are still following problems:
1) Dialogs are sometimes too wide on startup
2) Some widgets are incorrectly placed (again, in horizontal direction)
3) NullPointerException in ICQJava classes after getting some events.
4) Some buttons should be disabled, but are not.

Pavel Roskin
-------------- next part --------------
Index: libraries/javalib/java/awt/CardLayout.java
===================================================================
RCS file: /home/cvspublic/kaffe/libraries/javalib/java/awt/CardLayout.java,v
retrieving revision 1.6
diff -u -r1.6 CardLayout.java
--- CardLayout.java	1999/03/24 07:56:18	1.6
+++ CardLayout.java	1999/04/20 13:56:14
@@ -194,6 +194,8 @@
 
 public void show ( Container parent, String name) {
 	Component nc = (Component)tab.get( name);
+	if ( nc == null )
+		return;
 	int cc = parent.getComponentCount();
 	
 	for ( int i=0; i<cc; i++) {
Index: libraries/javalib/java/awt/widgets/RowCanvas.java
===================================================================
RCS file: /home/cvspublic/kaffe/libraries/javalib/java/awt/widgets/RowCanvas.java,v
retrieving revision 1.6
diff -u -r1.6 RowCanvas.java
--- RowCanvas.java	1999/03/11 21:10:00	1.6
+++ RowCanvas.java	1999/04/20 13:56:14
@@ -241,6 +241,8 @@
 }
 
 int repaintRows( Graphics g, int sIdx, int len) {
+	if ( g == null )
+		return 0;
 	int rs = rows.size();
 	int d = BORDER_WIDTH;
 	int y = d;


More information about the kaffe mailing list