diff --git a/src/segments/sysinfo.go b/src/segments/sysinfo.go index 08209cf6..931b3e6e 100644 --- a/src/segments/sysinfo.go +++ b/src/segments/sysinfo.go @@ -77,7 +77,7 @@ func (s *SystemInfo) Init(props properties.Properties, env environment.Environme } // times processorTimes, err := cpu.Percent(0, false) - if err == nil { + if err == nil && len(processorTimes) > 0 { s.Times = processorTimes[0] } // cpu