[kaffe] CVS kaffe (guilhem): Fixlet for Xlib

Kaffe CVS cvs-commits at kaffe.org
Sun Jul 24 10:22:44 PDT 2005


PatchSet 6763 
Date: 2005/07/24 17:17:28
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Fixlet for Xlib

        * libraries/clib/awt/X/fnt.c
        (fntInitFont): Return NULL if an error occured.

Members: 
	ChangeLog:1.4288->1.4289 
	libraries/clib/awt/X/fnt.c:1.16->1.17 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4288 kaffe/ChangeLog:1.4289
--- kaffe/ChangeLog:1.4288	Sun Jul 24 15:44:12 2005
+++ kaffe/ChangeLog	Sun Jul 24 17:17:28 2005
@@ -1,5 +1,10 @@
 2005-07-24  Guilhem Lavaux  <guilhem at kaffe.org>
 
+	* libraries/clib/awt/X/fnt.c
+	(fntInitFont): Return NULL if an error occured.
+
+2005-07-24  Guilhem Lavaux  <guilhem at kaffe.org>
+
 	* libraries/clib/awt/X/img.c:
 	(Java_java_awt_Toolkit_imgCreateImageFromFile,
 	Java_java_awt_Toolkit_imgCreateFromData): Another fixlet for NULL
Index: kaffe/libraries/clib/awt/X/fnt.c
diff -u kaffe/libraries/clib/awt/X/fnt.c:1.16 kaffe/libraries/clib/awt/X/fnt.c:1.17
--- kaffe/libraries/clib/awt/X/fnt.c:1.16	Thu Jul 21 17:30:36 2005
+++ kaffe/libraries/clib/awt/X/fnt.c	Sun Jul 24 17:17:27 2005
@@ -154,7 +154,9 @@
 	}
   }
 
-  return JCL_NewRawDataObject (env, xoc);
+  if (xoc != NULL)
+    return JCL_NewRawDataObject (env, xoc);
+  return NULL;
 #else  
   if ( ! fs ){
     /* now we are getting desperate, try the spec directly (without vars) */
@@ -168,7 +170,9 @@
 	}
   }
 
-  return JCL_NewRawDataObject (env, fs);
+  if (fs != NULL)
+    return JCL_NewRawDataObject (env, fs);
+  return NULL;
 #endif  
 }
 




More information about the kaffe mailing list