Skip to content
Snippets Groups Projects
Commit 3019dfd4 authored by Joshua Colp's avatar Joshua Colp Committed by Gerrit Code Review
Browse files

Merge "res_stasis: Don't unsubscribe from a NULL bridge."

parents dbbd1b88 d30415bf
No related branches found
No related tags found
No related merge requests found
......@@ -1328,7 +1328,9 @@ int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
bridge = ao2_bump(stasis_app_get_bridge(control));
if (bridge != last_bridge) {
app_unsubscribe_bridge(app, last_bridge);
if (last_bridge) {
app_unsubscribe_bridge(app, last_bridge);
}
if (bridge) {
app_subscribe_bridge(app, bridge);
}
......@@ -1389,7 +1391,9 @@ int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
ast_bridge_depart(chan);
}
app_unsubscribe_bridge(app, stasis_app_get_bridge(control));
if (stasis_app_get_bridge(control)) {
app_unsubscribe_bridge(app, stasis_app_get_bridge(control));
}
ao2_cleanup(bridge);
/* Only publish a stasis_end event if it hasn't already been published */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment