From 2bcc7675b8fe1fd37ca28b5e7cc03b45614ac386 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 8dd0e4626ae..f684718eaa8 100644 --- a/gnovm/stdlibs/std/native.go +++ b/gnovm/stdlibs/std/native.go @@ -70,7 +70,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) } }