aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorylecollen <ylecollen@amdocs.com>2017-01-03 11:04:06 +0100
committerylecollen <ylecollen@amdocs.com>2017-01-03 11:04:06 +0100
commit5e948b1ac42ad44c0207d00144d32e1611ccf7a6 (patch)
treef4ef4c53454c69a6389201232fef25abc4f851a2
parentc8c7a8ad19d3238ae3c0c7db4eaff165748a6a1e (diff)
Add exception checks
-rw-r--r--java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_jni_helper.cpp2
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);