Skip to content
This repository was archived by the owner on Jun 2, 2023. It is now read-only.

Commit 2bfd3fe

Browse files
committed
fix: call method nil.
1 parent 4a873e9 commit 2bfd3fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

passes/bodyclose/bodyclose.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ func (r *runner) isCloseCall(ccall ssa.Instruction) bool {
227227
return true
228228
}
229229
case *ssa.Call:
230-
if ccall.Call.Method.Name() == r.closeMthd.Name() {
230+
if ccall.Call.Method != nil && ccall.Call.Method.Name() == r.closeMthd.Name() {
231231
return true
232232
}
233233
case *ssa.ChangeInterface:

0 commit comments

Comments
 (0)