From 61419585b47b92d77d8a264472827f6c9bc045b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Wed, 22 Oct 2014 11:59:32 +0200 Subject: [PATCH] Test that LinphonePlayer has been instanciated while destroying --- coreapi/linphonecore_jni.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 8b7ea4039..bcaaa3de0 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -5301,6 +5301,10 @@ extern "C" void Java_org_linphone_core_LinphonePlayerImpl_close(JNIEnv *env, job extern "C" void Java_org_linphone_core_LinphonePlayerImpl_destroy(JNIEnv *env, jobject jobj, jlong playerPtr) { LinphonePlayer *player = (LinphonePlayer *)playerPtr; + if(player == NULL) { + ms_error("Cannot destroy the LinphonePlayerImpl object. Native pointer is NULL"); + return; + } if(player->user_data) { delete (LinphonePlayerData *)player->user_data; }