mac-avcapture: Fix NSString being initialized with NULL

Calling [NSString stringWithUTF8String:] with NULL causes it to raise an
exception: +[NSString stringWithUTF8String:]: NULL cString
master
Palana 2015-05-31 03:34:29 +02:00
parent 161198ba6c
commit 41c32fd6b6
1 changed files with 1 additions and 1 deletions

View File

@ -639,7 +639,7 @@ static bool update_device_list(obs_property_t *list,
size_t size = obs_property_list_item_count(list);
for (size_t i = 0; i < size;) {
const char *uid_ = obs_property_list_item_string(list, i);
bool found = [uid isEqualToString:@(uid_)];
bool found = [uid isEqualToString:@(uid_ ? uid_ : "")];
bool disabled = obs_property_list_item_disabled(list, i);
if (!found && !disabled) {
i += 1;