mirror of
https://github.com/yusing/godoxy.git
synced 2025-06-09 13:02:33 +02:00
fixed nil dereferencing
This commit is contained in:
parent
daca4b7735
commit
6728bc39d2
2 changed files with 5 additions and 3 deletions
2
frontend
2
frontend
|
@ -1 +1 @@
|
||||||
Subproject commit d0e59630d6e0beb1c22d2f242f556464a5056c1f
|
Subproject commit 441fd708dbed89c59bf72a742431a78ff2f02bc3
|
|
@ -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())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue