diff options
-rw-r--r-- | channels/chan_iax2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index bfb7c2093..a090801ed 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -974,8 +974,10 @@ static struct iax2_thread *find_idle_thread(void) /* this thread is not processing a full frame (since it is idle), so ensure that the field for the full frame call number is empty */ - thread->ffcallno = 0; - memset(&thread->ffsin, 0, sizeof(thread->ffsin)); + if (thread) { + thread->ffcallno = 0; + memset(&thread->ffsin, 0, sizeof(thread->ffsin)); + } return thread; } |