Fixed ticket #320: Assertion error in pjsua when unregistering/removing account while network is disconnected (thanks Bo Huang)
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1342 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
a6992c53ae
commit
e68e99f63e
1 changed files with 3 additions and 1 deletions
|
@ -365,7 +365,9 @@ PJ_DEF(pj_status_t) pjsua_acc_del(pjsua_acc_id acc_id)
|
||||||
/* Delete registration */
|
/* Delete registration */
|
||||||
if (pjsua_var.acc[acc_id].regc != NULL) {
|
if (pjsua_var.acc[acc_id].regc != NULL) {
|
||||||
pjsua_acc_set_registration(acc_id, PJ_FALSE);
|
pjsua_acc_set_registration(acc_id, PJ_FALSE);
|
||||||
pjsip_regc_destroy(pjsua_var.acc[acc_id].regc);
|
if (pjsua_var.acc[acc_id].regc) {
|
||||||
|
pjsip_regc_destroy(pjsua_var.acc[acc_id].regc);
|
||||||
|
}
|
||||||
pjsua_var.acc[acc_id].regc = NULL;
|
pjsua_var.acc[acc_id].regc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue