aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_iax2.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r--channels/chan_iax2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 3246bae5a..46b3b5ff8 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -11184,7 +11184,9 @@ static void delete_users(void)
AST_LIST_LOCK(&registrations);
while ((reg = AST_LIST_REMOVE_HEAD(&registrations, entry))) {
- ast_sched_thread_del(sched, reg->expire);
+ if (sched) {
+ ast_sched_thread_del(sched, reg->expire);
+ }
if (reg->callno) {
int callno = reg->callno;
ast_mutex_lock(&iaxsl[callno]);