Skip to content

Commit 895077c

Browse files
authored
Fix potential NPE in call transfer. (#382)
1 parent 0fc0af7 commit 895077c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/sip/inbound.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ func (c *inboundCall) transferCall(ctx context.Context, transferTo string, heade
958958
defer func() {
959959
if retErr != nil && !c.done.Load() {
960960
c.lkRoom.SwapOutput(w)
961-
} else {
961+
} else if w != nil {
962962
w.Close()
963963
}
964964
}()

0 commit comments

Comments
 (0)