mirror of https://github.com/snes9xgit/snes9x.git
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;
|
deviceStruct.index += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name == nil)
|
||||||
|
{
|
||||||
|
name = @"Unknown Device";
|
||||||
|
}
|
||||||
|
|
||||||
allDevices.insert(deviceStruct);
|
allDevices.insert(deviceStruct);
|
||||||
std::string s = std::string(name.UTF8String);
|
std::string s = std::string(name.UTF8String);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue