diff --git a/stacktrace/frame.go b/stacktrace/frame.go index 5edea1b7..0d590d9a 100644 --- a/stacktrace/frame.go +++ b/stacktrace/frame.go @@ -9,6 +9,9 @@ import ( // NewFrame returns a new stack frame for the provided information func NewFrame(pc uintptr, file string, line int) Frame { fn := runtime.FuncForPC(pc) + if fn == nil { + return Frame{} + } pack, name := parseFunctionName(fn.Name()) return Frame{ Line: line,