From: Russell Bryant Date: Tue, 13 Jul 2010 19:14:54 +0000 (+0000) Subject: Only reset a CDR that exists. X-Git-Tag: 1.4.35-rc1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26706f51b40568c5aeee1cd4a4359432c9cb6940;p=thirdparty%2Fasterisk.git Only reset a CDR that exists. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@276126 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_features.c b/res/res_features.c index 80e42fe1c8..11e4fa5ed9 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -2193,7 +2193,9 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast ast_channel_unlock(chan_ptr); } /* new channel */ - ast_cdr_specialized_reset(new_peer_cdr,0); + if (new_peer_cdr) { + ast_cdr_specialized_reset(new_peer_cdr, 0); + } } else { ast_cdr_specialized_reset(peer->cdr, 0); /* nothing changed, reset the peer cdr */ }