mirror of
https://github.com/libretro/snes9x.git
synced 2024-11-30 03:50:25 +00:00
Mac: Fix a crash when enumerating USB devices without a name. Closes #810
This commit is contained in:
parent
aa5f80c34e
commit
c9b0d104f8
@ -519,6 +519,11 @@ void AddDevice (IOHIDDeviceRef device)
|
||||
deviceStruct.index += 1;
|
||||
}
|
||||
|
||||
if (name == nil)
|
||||
{
|
||||
name = @"Unknown Device";
|
||||
}
|
||||
|
||||
allDevices.insert(deviceStruct);
|
||||
std::string s = std::string(name.UTF8String);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user