diff options
Diffstat (limited to 'java/android/OlmLibSdk/olm-sdk/src/main/jni')
-rw-r--r-- | java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_jni_helper.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_jni_helper.cpp b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_jni_helper.cpp index 767fad4..c649d32 100644 --- a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_jni_helper.cpp +++ b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_jni_helper.cpp @@ -62,7 +62,7 @@ bool setRandomInBuffer(JNIEnv *env, uint8_t **aBuffer2Ptr, size_t aRandomSize) newObj = env->NewObject(cls, constructor); jbyteArray tempByteArray = env->NewByteArray(bufferLen); - if (newObj && tempByteArray) + if (newObj && tempByteArray && !env->ExceptionOccurred()) { env->CallVoidMethod(newObj, nextByteMethod, tempByteArray); jbyte* buffer = env->GetByteArrayElements(tempByteArray, NULL); |