diff --git a/pkg/analyzer/defer_only.go b/pkg/analyzer/defer_only.go index 701c7c6..ef5d0ba 100644 --- a/pkg/analyzer/defer_only.go +++ b/pkg/analyzer/defer_only.go @@ -190,6 +190,10 @@ func getTargetTypesValues(b *ssa.BasicBlock, i int, targetTypes []any) []targetV continue } + if call.Referrers() == nil { + continue + } + for _, cRef := range *call.Referrers() { switch instr := cRef.(type) { case *ssa.Call: