From 54f46d6380131d3078ac900c7fbfef0d4146f452 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sun, 16 Oct 2022 15:23:06 -0700 Subject: [PATCH] Ignore unnamed audio devices on enumeration This was crashing trying to assign a nil CFStringRef from mystery audio devices to the NSString passed to the enumerate block function, which was predictably crashing. Ignore such devices instead. Signed-off-by: Christopher Snowhill --- Preferences/Preferences/OutputsArrayController.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Preferences/Preferences/OutputsArrayController.m b/Preferences/Preferences/OutputsArrayController.m index 61aaf7f45..698d5cf8e 100644 --- a/Preferences/Preferences/OutputsArrayController.m +++ b/Preferences/Preferences/OutputsArrayController.m @@ -68,6 +68,9 @@ propsize = sizeof(name); theAddress.mSelector = kAudioDevicePropertyDeviceNameCFString; __Verify_noErr(AudioObjectGetPropertyData(devids[i], &theAddress, 0, NULL, &propsize, &name)); + if(!name) { + continue; + } propsize = 0; theAddress.mSelector = kAudioDevicePropertyStreamConfiguration;