Fix seg on non-PRI
authorMark Spencer <markster@digium.com>
Fri, 16 May 2003 14:23:23 +0000 (14:23 +0000)
committerMark Spencer <markster@digium.com>
Fri, 16 May 2003 14:23:23 +0000 (14:23 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1027 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 505bb77..46b789a 100755 (executable)
@@ -3432,7 +3432,7 @@ static int zt_indicate(struct ast_channel *chan, int condition)
                        ast_log(LOG_DEBUG,"Received AST_CONTROL_PROGRESS on %s\n",chan->name);
 #ifdef ZAPATA_PRI
 #ifdef PRI_EVENT_PROCEEDING
-                       if (!p->proceeding && p->pri->overlapdial && p->sig==SIG_PRI) {
+                       if (!p->proceeding && (!p->pri || p->pri->overlapdial) && p->sig==SIG_PRI) {
                                if (p->pri && p->pri->pri) {            
                                        if (!pri_grab(p, p->pri))
                                                pri_acknowledge(p->pri->pri,p->call, p->prioffset, 1);