Unverified Commit 58aeab77 authored by Marius van der Wijden's avatar Marius van der Wijden Committed by GitHub

tests: fix nil pointer panic on failure (#23053)

parent 97ce6dfa
......@@ -74,8 +74,10 @@ func TestState(t *testing.T) {
t.Run(key+"/snap", func(t *testing.T) {
withTrace(t, test.gasLimit(subtest), func(vmconfig vm.Config) error {
snaps, statedb, err := test.Run(subtest, vmconfig, true)
if _, err := snaps.Journal(statedb.IntermediateRoot(false)); err != nil {
return err
if snaps != nil && statedb != nil {
if _, err := snaps.Journal(statedb.IntermediateRoot(false)); err != nil {
return err
}
}
return st.checkFailure(t, err)
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment