If it is NULL, we can skip this channel, since it can't the one we're looking for.
(closes issue #9299)
Reported by: vazir
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114120
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
while(pvt) {
if (!pvt->needdestroy && ((signed int)pvt->cd.call_reference == call_reference)) {
/* Found the call */
- if ((token != NULL) && (!strcmp(pvt->cd.call_token, token))) {
+ if ((token != NULL) && (pvt->cd.call_token != NULL) && (!strcmp(pvt->cd.call_token, token))) {
ast_mutex_lock(&pvt->lock);
ast_mutex_unlock(&iflock);
return pvt;