From b503219183dd6eb9583deb892c878f1dfdc6da94 Mon Sep 17 00:00:00 2001 From: Omar Sy Date: Sun, 21 Apr 2024 19:20:56 +0200 Subject: [PATCH] to revert --- gnovm/stdlibs/std/native.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnovm/stdlibs/std/native.go b/gnovm/stdlibs/std/native.go index 860f4b61715..80dab002995 100644 --- a/gnovm/stdlibs/std/native.go +++ b/gnovm/stdlibs/std/native.go @@ -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) } }