From 9b607747ce3064a0229bcfcd45721c5e95784f95 Mon Sep 17 00:00:00 2001 From: "Joshua C. Colp" Date: Wed, 9 Aug 2023 07:57:33 -0300 Subject: [PATCH] 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. --- main/manager_channels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/manager_channels.c b/main/manager_channels.c index 8af3465a29..344a2487a7 100644 --- a/main/manager_channels.c +++ b/main/manager_channels.c @@ -493,7 +493,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; }