Add exception checks
This commit is contained in:
parent
c8c7a8ad19
commit
5e948b1ac4
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue