From: Joshua C. Colp Date: Wed, 9 Aug 2023 10:57:33 +0000 (-0300) Subject: manager: Tolerate stasis messages with no channel snapshot. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a75035be554e05fe39bd50fc669b0b6464a3b8c0;p=thirdparty%2Fasterisk.git 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. --- diff --git a/main/manager_channels.c b/main/manager_channels.c index 9aa980da3a..57bf828088 100644 --- a/main/manager_channels.c +++ b/main/manager_channels.c @@ -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; }