Skip to content

Commit

Permalink
Avoid panic in profiler
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-at-luther committed Jan 3, 2024
1 parent 763d1a0 commit ee40ea3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lisp/x/profiler/profiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ func getFunNameFromFID(rt *lisp.Runtime, in string) string {
}

// prettyFunName constructs a pretty canonical name.
// IMPORTANT: must be type with FunData()
func prettyFunName(runtime *lisp.Runtime, fun *lisp.LVal) string {
if fun.Type != lisp.LFun {
return ""
}
funData := fun.FunData()
if funData == nil {
return ""
Expand Down

0 comments on commit ee40ea3

Please sign in to comment.