Merge pull request #92169 from chendave/perf_nil_pointer
scheduler_perf: fix the nil pointer dereference
This commit is contained in:
@@ -179,7 +179,10 @@ func collectHistogram(metric string, labels map[string]string) *DataItem {
|
|||||||
klog.Error(err)
|
klog.Error(err)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
if hist.Histogram == nil {
|
||||||
|
klog.Errorf("metric %q is not a Histogram metric", metric)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
if err := hist.Validate(); err != nil {
|
if err := hist.Validate(); err != nil {
|
||||||
klog.Error(err)
|
klog.Error(err)
|
||||||
return nil
|
return nil
|
||||||
|
Reference in New Issue
Block a user