manager: Tolerate stasis messages with no channel snapshot.

In some cases I have yet to determine some stasis messages may
be created without a channel snapshot. This change adds some
tolerance to this scenario, preventing a crash from occurring.
pull/264/head
Joshua C. Colp 2 years ago committed by asterisk-org-access-app[bot]
parent c3c82441a2
commit be3d8266da

@ -467,7 +467,7 @@ struct ast_str *ast_manager_build_channel_state_string_prefix(
char *connected_name;
int res;
if (snapshot->base->tech_properties & AST_CHAN_TP_INTERNAL) {
if (!snapshot || (snapshot->base->tech_properties & AST_CHAN_TP_INTERNAL)) {
return NULL;
}

Loading…
Cancel
Save