mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: prevent a crash when the sensors read is running, but the sensors list was changed (by enabling/disabling the unknown sensors) (quick fix) (#1171)
This commit is contained in:
@@ -129,7 +129,9 @@ internal class SensorsReader: Reader<[Sensor_p]> {
|
||||
}
|
||||
|
||||
public override func read() {
|
||||
let sensorsCounter = self.list.count
|
||||
for (i, s) in self.list.enumerated() {
|
||||
guard self.list.count == sensorsCounter else { return }
|
||||
if s.group == .hid || s.isComputed {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user