Skip to content

Commit

Permalink
to revert
Browse files Browse the repository at this point in the history
  • Loading branch information
omarsy committed Apr 21, 2024
1 parent 79fefe0 commit b503219
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnovm/stdlibs/std/native.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func getTimestamp(m *gno.Machine) int64 {
// getPrevFunctionNameFromTarget returns the last called function name (identifier) from the call stack.
func getPrevFunctionNameFromTarget(m *gno.Machine, targetFunc string) string {
for i := 0; i < len(m.Frames); i++ {
if m.Frames[i].Func.Name == gno.Name(targetFunc) && i > 0 {
if m.Frames[i].Func != nil && m.Frames[i].Func.Name == gno.Name(targetFunc) && i > 0 {
return string(m.Frames[i-1].Func.Name)
}
}
Expand Down

0 comments on commit b503219

Please sign in to comment.