mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-05-06 09:17:10 +00:00
don't run os feature collector if metric not initialized
This commit is contained in:
@@ -142,7 +142,7 @@ func (ofc *osFeatureCollector) recordFeaturesFromModules(modules []system.Module
|
||||
}
|
||||
|
||||
func (ofc *osFeatureCollector) collect() {
|
||||
if ofc.osFeature == nil {
|
||||
if ofc == nil || ofc.osFeature == nil {
|
||||
return
|
||||
}
|
||||
cmdlineArgs, err := system.CmdlineArgs()
|
||||
|
||||
Reference in New Issue
Block a user