Merged revisions 74515 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Wed, 11 Jul 2007 14:10:38 +0000 (14:10 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 11 Jul 2007 14:10:38 +0000 (14:10 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r74515 | file | 2007-07-11 11:09:13 -0300 (Wed, 11 Jul 2007) | 2 lines

Only check if we need to do a SIGMA based tone generation if we have a card. (issue #10179 reported by mikowhy)

........

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

channels/chan_phone.c

index 781431c..91feea1 100644 (file)
@@ -1068,7 +1068,7 @@ static void *do_monitor(void *data)
                ast_mutex_unlock(&iflock);
 
                /* Wait indefinitely for something to happen */
-               if (dotone && i->mode != MODE_SIGMA) {
+               if (dotone && i && i->mode != MODE_SIGMA) {
                        /* If we're ready to recycle the time, set it to 30 ms */
                        tonepos += 240;
                        if (tonepos >= sizeof(DialTone))