aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-05 15:22:30 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-05 15:22:30 +0000
commit57a489abfdcdbf55b611feac52794e0ad9e953fb (patch)
treed2e9debdbdf98c3a5e9264799d7ce8902bca6172 /channels
parent53d1e274ac3a609148ca3a1274e25f9da69f3b67 (diff)
Only muck with the thread structure if an idle one was found/created.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@67304 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_iax2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 49b95c5c2..438b12f68 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -888,8 +888,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;
}