diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 34f91987ca..ef29068d19 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -8250,11 +8250,11 @@ retryowner2: iax_frame_wrap(fr, &f); /* If this is our most recent packet, use it as our basis for timestamping */ - if (iaxs[fr->callno]->last < fr->ts) { + if (iaxs[fr->callno] && iaxs[fr->callno]->last < fr->ts) { /*iaxs[fr->callno]->last = fr->ts; (do it afterwards cos schedule/forward_delivery needs the last ts too)*/ fr->outoforder = 0; } else { - if (option_debug && iaxdebug) + if (option_debug && iaxdebug && iaxs[fr->callno]) ast_log(LOG_DEBUG, "Received out of order packet... (type=%d, subclass %d, ts = %d, last = %d)\n", f.frametype, f.subclass, fr->ts, iaxs[fr->callno]->last); fr->outoforder = -1; }