Commit a573636c authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fixed issue with removeListener in Java wrapper

parent 4a5d2e4c
......@@ -386,8 +386,10 @@ void Java_{{jniPackage}}{{className}}Impl_removeListener(JNIEnv* env, jobject th
bctbx_list_t *it;
for (it = (bctbx_list_t *)cbs_list; it != NULL; it = it->next) {
{{classCName}}Cbs *cbs = ({{classCName}}Cbs *)it->data;
if ({{cPrefix}}_cbs_get_user_data(cbs) == jlistener) {
jobject listener = (jobject) {{cPrefix}}_cbs_get_user_data(cbs);
if (env->IsSameObject(listener, jlistener)) {
{{cPrefix}}_remove_callbacks(cptr, cbs);
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