Skip to content
Snippets Groups Projects
Commit 5e948b1a authored by ylecollen's avatar ylecollen
Browse files

Add exception checks

parent c8c7a8ad
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment