diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index 9e550fe77a47ccb697662d6807a46c3a5d67ed5c..74b7a2f63d1d0c02a1b07efd8e4677bf00530a05 100644 --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -476,8 +476,11 @@ static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state, } } - manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate", "Channel: %s\r\nChanneltype: %s\r\n" + if (ch) { + manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate", + "Channel: %s\r\nChanneltype: %s\r\n" "CallRef: %d\r\n", ast_channel_name(ch), "OOH323", i->call_reference); + } } else ast_log(LOG_WARNING, "Unable to allocate channel structure\n");