summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/native
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow/native')
-rw-r--r--src/nativewindow/native/JAWT_DrawingSurfaceInfo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nativewindow/native/JAWT_DrawingSurfaceInfo.c b/src/nativewindow/native/JAWT_DrawingSurfaceInfo.c
index 470f03a49..2a6651007 100644
--- a/src/nativewindow/native/JAWT_DrawingSurfaceInfo.c
+++ b/src/nativewindow/native/JAWT_DrawingSurfaceInfo.c
@@ -59,6 +59,13 @@ Java_jogamp_nativewindow_jawt_JAWT_1DrawingSurfaceInfo_platformInfo0(JNIEnv* env
return NULL;
}
if (dsi->platformInfo == NULL) {
+ (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/RuntimeException"),
+ "platformInfo pointer is NULL");
+ return NULL;
+ }
+ if(0==PLATFORM_DSI_SIZE) {
+ (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/RuntimeException"),
+ "platformInfo size is 0");
return NULL;
}
return (*env)->NewDirectByteBuffer(env, dsi->platformInfo, PLATFORM_DSI_SIZE);