From 2673f2d6b9b5e90553b2a24bdeaf6a8dff16ed51 Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Mon, 28 Oct 2024 09:39:06 +0000 Subject: [PATCH] fix: nil pointer dereference --- core/result/failure/faillure.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/result/failure/faillure.go b/core/result/failure/faillure.go index 428a6ad..ecaa8b8 100644 --- a/core/result/failure/faillure.go +++ b/core/result/failure/faillure.go @@ -73,6 +73,9 @@ type failure struct { } func (f failure) Name() string { + if f.model.Name == nil { + return "" + } return *f.model.Name } @@ -85,6 +88,9 @@ func (f failure) Error() string { } func (f failure) Stack() string { + if f.model.Stack == nil { + return "" + } return *f.model.Stack }