--- a/jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c Tue Jul 06 18:23:14 2010 -0700
+++ b/jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c Mon Jul 12 13:16:28 2010 -0700
@@ -111,6 +111,10 @@
{
BufImgSDOps *bisdo =
(BufImgSDOps*)SurfaceData_InitOps(env, bisd, sizeof(BufImgSDOps));
+ if (bisdo == NULL) {
+ JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
+ return;
+ }
bisdo->sdOps.Lock = BufImg_Lock;
bisdo->sdOps.GetRasInfo = BufImg_GetRasInfo;
bisdo->sdOps.Release = BufImg_Release;