mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
PhysicalDisk (macOS): fix a possible segfault
This commit is contained in:
@@ -126,7 +126,7 @@ const char* ffDetectPhysicalDisk(FFlist* result, FFPhysicalDiskOptions* options)
|
||||
if (options->temp)
|
||||
{
|
||||
FF_CFTYPE_AUTO_RELEASE CFBooleanRef nvmeSMARTCapable = IORegistryEntryCreateCFProperty(entryPhysical, CFSTR(kIOPropertyNVMeSMARTCapableKey), kCFAllocatorDefault, kNilOptions);
|
||||
if (CFBooleanGetValue(nvmeSMARTCapable))
|
||||
if (nvmeSMARTCapable && CFBooleanGetValue(nvmeSMARTCapable))
|
||||
detectSsdTemp(entryPhysical, &device->temperature);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user