Browse code

sbc b/f: increment logger reference only if not NULL

fixes b7d4e2e74de2b9df2aadfd407b7ba51d2a4a121a

Václav Kubart authored on 24/04/2013 06:03:52 • Raphael Coeffic committed on 22/05/2013 19:50:18
Showing 1 changed files
... ...
@@ -1669,7 +1669,7 @@ void SBCCallLeg::setLogger(msg_logger *_logger)
1669 1669
   if (logger) dec_ref(logger); // release the old one
1670 1670
 
1671 1671
   logger = _logger;
1672
-  inc_ref(logger);
1672
+  if (logger) inc_ref(logger);
1673 1673
   if (call_profile.log_sip) dlg->setMsgLogger(logger);
1674 1674
 
1675 1675
   AmB2BMedia *m = getMediaSession();