From 4d90b7f873b6e709601325ed7e74fd397ba436cb Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 9 Feb 2011 16:33:48 +0100 Subject: [PATCH] fix crash when calling itself... --- coreapi/callbacks.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index 28b980312..f40cc447c 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -506,7 +506,9 @@ static void call_failure(SalOp *op, SalError error, SalReason sr, const char *de static void call_released(SalOp *op){ LinphoneCall *call=(LinphoneCall*)sal_op_get_user_pointer(op); - linphone_call_set_state(call,LinphoneCallReleased,"Call released"); + if (call!=NULL){ + linphone_call_set_state(call,LinphoneCallReleased,"Call released"); + }else ms_error("call_released() for already destroyed call ?"); } static void auth_requested(SalOp *h, const char *realm, const char *username){