Test that LinphonePlayer has been instanciated while destroying

This commit is contained in:
François Grisez 2014-10-22 11:59:32 +02:00
parent f7640d9e45
commit 61419585b4

View file

@ -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;
}