diff --git a/channels/chan_zap.c b/channels/chan_zap.c index c09d550cf89fafb1c2924e059c4b91131fd19e77..fe490c5d7f69a55a74edc100c97db6256ed87557 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -2572,8 +2572,10 @@ static struct ast_frame *zt_handle_event(struct ast_channel *ast) case ZT_EVENT_ALARM: #ifdef ZAPATA_PRI #ifdef PRI_DESTROYCALL - if (p->call && p->pri->pri) + if (p->call && p->pri && p->pri->pri) pri_destroycall(p->pri->pri, p->call); + else + ast_log(LOG_WARNING, "The PRI Call have not been destroyed\n"); p->call = NULL; #else #error Please "cvs update" and recompile libpri