Skip to content

Commit 2bcc767

Browse files
omarsyVillaquiranm
authored andcommitted
to revert
1 parent 184bdf4 commit 2bcc767

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gnovm/stdlibs/std/native.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func getTimestamp(m *gno.Machine) int64 {
7070
// getPrevFunctionNameFromTarget returns the last called function name (identifier) from the call stack.
7171
func getPrevFunctionNameFromTarget(m *gno.Machine, targetFunc string) string {
7272
for i := 0; i < len(m.Frames); i++ {
73-
if m.Frames[i].Func.Name == gno.Name(targetFunc) && i > 0 {
73+
if m.Frames[i].Func != nil && m.Frames[i].Func.Name == gno.Name(targetFunc) && i > 0 {
7474
return string(m.Frames[i-1].Func.Name)
7575
}
7676
}

0 commit comments

Comments
 (0)