Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matrix-org
Olm
Commits
eec8a50c
Commit
eec8a50c
authored
Jan 05, 2017
by
ylecollen
Browse files
Move the exception test
parent
90c55806
Changes
1
Show whitespace changes
Inline
Side-by-side
java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_jni_helper.cpp
View file @
eec8a50c
...
...
@@ -62,9 +62,12 @@ bool setRandomInBuffer(JNIEnv *env, uint8_t **aBuffer2Ptr, size_t aRandomSize)
newObj
=
env
->
NewObject
(
cls
,
constructor
);
jbyteArray
tempByteArray
=
env
->
NewByteArray
(
bufferLen
);
if
(
newObj
&&
tempByteArray
&&
!
env
->
ExceptionOccurred
()
)
if
(
newObj
&&
tempByteArray
)
{
env
->
CallVoidMethod
(
newObj
,
nextByteMethod
,
tempByteArray
);
if
(
!
env
->
ExceptionOccurred
())
{
jbyte
*
buffer
=
env
->
GetByteArrayElements
(
tempByteArray
,
NULL
);
if
(
buffer
)
...
...
@@ -80,6 +83,7 @@ bool setRandomInBuffer(JNIEnv *env, uint8_t **aBuffer2Ptr, size_t aRandomSize)
env
->
ReleaseByteArrayElements
(
tempByteArray
,
buffer
,
JNI_ABORT
);
}
}
}
if
(
tempByteArray
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment