fix nil ptr
This commit is contained in:
parent
47e467057d
commit
83f2c28c20
1 changed files with 3 additions and 0 deletions
|
@ -33,6 +33,9 @@ func TimedComponent(component string) *Timing {
|
||||||
}
|
}
|
||||||
|
|
||||||
func ClearTimings() {
|
func ClearTimings() {
|
||||||
|
if timings == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
timings.Range(func(key interface{}, value interface{}) bool {
|
timings.Range(func(key interface{}, value interface{}) bool {
|
||||||
timings.Delete(key)
|
timings.Delete(key)
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in a new issue