[kaffe] CVS kaffe (guilhem): Xlib fixlet.

Kaffe CVS cvs-commits at kaffe.org
Sun Jul 24 08:49:33 PDT 2005


PatchSet 6762 
Date: 2005/07/24 15:44:12
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Xlib fixlet.

        * libraries/clib/awt/X/img.c:
        (Java_java_awt_Toolkit_imgCreateImageFromFile,
        Java_java_awt_Toolkit_imgCreateFromData): Another fixlet for NULL
        images (unknownImage is NULL).

Members: 
	ChangeLog:1.4287->1.4288 
	libraries/clib/awt/X/img.c:1.28->1.29 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4287 kaffe/ChangeLog:1.4288
--- kaffe/ChangeLog:1.4287	Sat Jul 23 13:49:30 2005
+++ kaffe/ChangeLog	Sun Jul 24 15:44:12 2005
@@ -1,3 +1,10 @@
+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
+	images (unknownImage is NULL).
+
 2005-07-23  Guilhem Lavaux  <guilhem at kaffe.org>
 
 	* libraries/clib/awt/X/img.c
Index: kaffe/libraries/clib/awt/X/img.c
diff -u kaffe/libraries/clib/awt/X/img.c:1.28 kaffe/libraries/clib/awt/X/img.c:1.29
--- kaffe/libraries/clib/awt/X/img.c:1.28	Sat Jul 23 13:49:33 2005
+++ kaffe/libraries/clib/awt/X/img.c	Sun Jul 24 15:44:16 2005
@@ -719,9 +719,11 @@
 	  }
 	}
 	AWT_CLOSE( infile);
-        return JCL_NewRawDataObject(env, img);
   }
 
+  if (img != NULL)
+    return JCL_NewRawDataObject(env, img);
+
   return NULL;
 }
 
@@ -752,10 +754,11 @@
 	  img = unknownImage;
 	}
      
-     nimg = JCL_NewRawDataObject(env, img);
   }
 
   (*env)->ReleaseByteArrayElements( env, jbuffer, jb, JNI_ABORT);
+  if (img != NULL)
+     nimg = JCL_NewRawDataObject(env, img);
   return nimg;
 }
 




More information about the kaffe mailing list