hangup without session

This commit is contained in:
Radu Ioan Fericean
2012-08-03 13:16:37 +03:00
parent eabec5b2b5
commit c24b0ef506

View File

@@ -72,9 +72,7 @@ func (rsd *SessionDelegate) OnChannelAnswer(ev Event, s *Session) {
}
func (rsd *SessionDelegate) OnChannelHangupComplete(ev Event, s *Session) {
log.Print(s)
log.Print(s.CallCosts)
if len(s.CallCosts) == 0 {
if s != nil && len(s.CallCosts) == 0 {
return // why would we have 0 callcosts
}
lastCC := s.CallCosts[len(s.CallCosts)-1]