Commit b9c2b8c9 authored by Sylvain Berfini's avatar Sylvain Berfini 🐮
Browse files

Do not create a JNI listener if Java one is null

parent b87dd9f1
......@@ -377,6 +377,7 @@ void Java_{{jniPackage}}{{className}}Impl_setListener(JNIEnv* env, jobject thiz,
void Java_{{jniPackage}}{{className}}Impl_addListener(JNIEnv* env, jobject thiz, jlong ptr, jobject jlistener) {
if (jlistener == NULL) return;
{{classCName}} *cptr = ({{classCName}}*)ptr;
jobject listener = env->NewGlobalRef(jlistener);
{{classCName}}Cbs *cbs = linphone_factory_create_{{factoryName}}_cbs(NULL);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment