Do not try to remove a registration scheduled item if the scheduler context has alrea...
authorJoshua Colp <jcolp@digium.com>
Mon, 2 Mar 2009 14:28:09 +0000 (14:28 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 2 Mar 2009 14:28:09 +0000 (14:28 +0000)
(closes issue #14580)
Reported by: alecdavis

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179323 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 3246bae..46b3b5f 100644 (file)
@@ -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]);