Commit 046184b5 authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

event.c: fix crash with event beeing freed twice in case of error

parent b58f81db
......@@ -332,7 +332,17 @@ const char* linphone_event_get_custom_header(LinphoneEvent* ev, const char* name
void linphone_event_terminate(LinphoneEvent *lev){
// if event was already terminated (including on error), we should not terminate it again
// otherwise it will be unreffed twice.
if (lev->publish_state == LinphonePublishError || lev->publish_state == LinphoneSubscriptionTerminated) {
if (lev->subscription_state == LinphoneSubscriptionError || lev->subscription_state == LinphoneSubscriptionTerminated) {
if (lev->dir==LinphoneSubscriptionIncoming){
}else if (lev->dir==LinphoneSubscriptionOutgoing){
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