Check tempchan->type in app_zapscan.c (bug 1250)
authorJames Golovich <james@gnuinter.net>
Fri, 19 Mar 2004 03:46:01 +0000 (03:46 +0000)
committerJames Golovich <james@gnuinter.net>
Fri, 19 Mar 2004 03:46:01 +0000 (03:46 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2465 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_zapscan.c

index 97fac25..b24fe5d 100755 (executable)
@@ -269,7 +269,7 @@ static int conf_exec(struct ast_channel *chan, void *data)
                 tempchan = ast_channel_walk(tempchan);
                 if ( !tempchan && !lastchan )
                         break;
-                if ( tempchan && (!strcmp(tempchan->type, "Zap")) && (tempchan != chan) ) {
+                if ( tempchan && tempchan->type && (!strcmp(tempchan->type, "Zap")) && (tempchan != chan) ) {
                         ast_verbose(VERBOSE_PREFIX_3 "Zap channel %s is in-use, monitoring...\n", tempchan->name);
                         strcpy(confstr, tempchan->name);
                         if ((tmp = strchr(confstr,'-'))) {