mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 08:48:32 +02:00
fixed nil dereferencing
This commit is contained in:
2
frontend
2
frontend
Submodule frontend updated: d0e59630d6...441fd708db
@@ -60,10 +60,12 @@ func (b Builder) Build() NestedError {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (b Builder) To(ptr *NestedError) {
|
func (b Builder) To(ptr *NestedError) {
|
||||||
if *ptr == nil {
|
if ptr == nil {
|
||||||
|
return
|
||||||
|
} else if *ptr == nil {
|
||||||
*ptr = b.Build()
|
*ptr = b.Build()
|
||||||
} else {
|
} else {
|
||||||
**ptr = *b.Build()
|
(*ptr).With(b.Build())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user