Skip to content

Commit 03fd9f4

Browse files
authored
Merge pull request #512 from TarsCloud/fix/client
fix: if sf is nil, it means statf is not initialized, so we just return
2 parents cbc345d + d32c956 commit 03fd9f4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tars/statf.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ func (s *StatFHelper) pushBackMsg(stStatInfo StatInfo, fromServer bool) {
163163

164164
// ReportMicMsg report the StatInfo ,from server shows whether it comes from server.
165165
func (s *StatFHelper) ReportMicMsg(stStatInfo StatInfo, fromServer bool) {
166+
// if sf is nil, it means statf is not initialized, so we just return
167+
if s.sf == nil {
168+
TLOG.Warn("StatFHelper not initialized")
169+
return
170+
}
166171
s.pushBackMsg(stStatInfo, fromServer)
167172
}
168173

0 commit comments

Comments
 (0)