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
5e948b1a
Commit
5e948b1a
authored
Jan 03, 2017
by
ylecollen
Browse files
Add exception checks
parent
c8c7a8ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_jni_helper.cpp
View file @
5e948b1a
...
...
@@ -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
);
...
...
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