From a8c2de110a2254af137a3d99007cc77e3ecd8078 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 6 Dec 2019 09:21:13 +0100 Subject: Bug 1412 - JNI: NEWT Check & Handle Exception after calling back into Java (NewtCommon.c) --- src/newt/native/NewtCommon.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/newt/native') diff --git a/src/newt/native/NewtCommon.c b/src/newt/native/NewtCommon.c index e419cb742..313b1b9fe 100644 --- a/src/newt/native/NewtCommon.c +++ b/src/newt/native/NewtCommon.c @@ -122,6 +122,7 @@ void NewtCommon_ExceptionCheck1_throwNewRuntimeException(JNIEnv *env, const char const char * NewtCommon_GetStaticStringMethod(JNIEnv *jniEnv, jclass clazz, jmethodID jGetStrID, char *dest, int destSize, const char *altText) { if(NULL != jniEnv && NULL != clazz && NULL != jGetStrID) { jstring jstr = (jstring) (*jniEnv)->CallStaticObjectMethod(jniEnv, clazz, jGetStrID); + NewtCommon_ExceptionCheck0(env); if(NULL != jstr) { const char * str = (*jniEnv)->GetStringUTFChars(jniEnv, jstr, NULL); if( NULL != str) { -- cgit v1.2.3