mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-29 16:50:20 +12:00
don't crash on intel
This commit is contained in:
parent
9f88187c29
commit
c252c618c0
|
@ -62,7 +62,7 @@ unordered_flat_map<int, double> Cpu::ThermalSensors::getSensors() {
|
|||
IOHIDEventSystemClientRef system = IOHIDEventSystemClientCreate(kCFAllocatorDefault);
|
||||
IOHIDEventSystemClientSetMatching(system, thermalSensors);
|
||||
CFArrayRef matchingsrvs = IOHIDEventSystemClientCopyServices(system);
|
||||
|
||||
if (matchingsrvs) {
|
||||
long count = CFArrayGetCount(matchingsrvs);
|
||||
for (int i = 0; i < count; i++) {
|
||||
IOHIDServiceClientRef sc = (IOHIDServiceClientRef)CFArrayGetValueAtIndex(matchingsrvs, i);
|
||||
|
@ -84,6 +84,7 @@ unordered_flat_map<int, double> Cpu::ThermalSensors::getSensors() {
|
|||
}
|
||||
}
|
||||
CFRelease(matchingsrvs);
|
||||
}
|
||||
CFRelease(system);
|
||||
CFRelease(thermalSensors);
|
||||
return cpuValues;
|
||||
|
|
Loading…
Reference in a new issue