Commit 2034d281 authored by Andrea Gianarda's avatar Andrea Gianarda
Browse files

Fix crash of test Subscribe with IO error

Do not set lev to NULL if its pointer is different from that held by the manager
parent 90a702d5
......@@ -2292,15 +2292,21 @@ void linphone_subscription_state_change(LinphoneCore *lc, LinphoneEvent *lev, Li
break;
case LinphoneSubscriptionTerminated:
counters->number_of_LinphoneSubscriptionTerminated++;
mgr->lev=NULL;
if (lev == mgr->lev) {
mgr->lev=NULL;
}
break;
case LinphoneSubscriptionError:
counters->number_of_LinphoneSubscriptionError++;
mgr->lev=NULL;
if (lev == mgr->lev) {
mgr->lev=NULL;
}
break;
case LinphoneSubscriptionExpiring:
counters->number_of_LinphoneSubscriptionExpiring++;
mgr->lev=NULL;
if (lev == mgr->lev) {
mgr->lev=NULL;
}
break;
}
linphone_content_unref(content);
......
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