diff --git a/client/android/tg_voip_jni.cpp b/client/android/tg_voip_jni.cpp index 104ee93..d812918 100644 --- a/client/android/tg_voip_jni.cpp +++ b/client/android/tg_voip_jni.cpp @@ -177,13 +177,12 @@ extern "C" JNIEXPORT void Java_org_telegram_messenger_voip_VoIPController_native } extern "C" JNIEXPORT void Java_org_telegram_messenger_voip_VoIPController_nativeRelease(JNIEnv* env, jobject thiz, jlong inst){ - //env->DeleteGlobalRef(AudioInputAndroid::jniClass); - VoIPController* ctlr=((VoIPController*)(intptr_t)inst); impl_data_android_t* impl=(impl_data_android_t*)ctlr->implData; - env->DeleteGlobalRef(impl->javaObject); + jobject jobj=impl->javaObject; free(impl); delete ctlr; + env->DeleteGlobalRef(jobj); }