]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
call manager_event only if there is not null channel structure
authorAlexandr Anikin <may@telecom-service.ru>
Tue, 14 Feb 2012 09:49:41 +0000 (09:49 +0000)
committerAlexandr Anikin <may@telecom-service.ru>
Tue, 14 Feb 2012 09:49:41 +0000 (09:49 +0000)
(Closes issue ASTERISK-19298)
Reported by: robinfood
Patches:
        issue19298.patch uploaded by may213 (License #5415)
........

Merged revisions 355136 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@355137 65c4cc65-6c06-0410-ace0-fbb531ad65f3

addons/chan_ooh323.c

index 74c3f2a00a78e44f600bffeb1bdd3fc1432b5a2f..9779d14834c012e56b43ebb10f283b4658d440c1 100644 (file)
@@ -472,8 +472,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");