From 7d0ee592151dc371675d7fd59e6a1a645e305fdd Mon Sep 17 00:00:00 2001 From: Alexandr Anikin Date: Tue, 14 Feb 2012 09:41:38 +0000 Subject: [PATCH] call manager_event only if there is not null channel structure (Closes issue ASTERISK-19298) Reported by: robinfood Patches: issue19298.patch uploaded by may213 (License #5415) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355136 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- addons/chan_ooh323.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index f72498bb4c..f15a3ed5da 100644 --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -449,8 +449,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", ch->name, "OOH323", i->call_reference); + } } else ast_log(LOG_WARNING, "Unable to allocate channel structure\n");