Fix a crash on macOS if a joystick fails to open
This commit is contained in:
parent
a092902483
commit
fe17cfc84d
1 changed files with 2 additions and 1 deletions
3
3rdparty/joystick/jsMacOSX.cxx
vendored
3
3rdparty/joystick/jsMacOSX.cxx
vendored
|
@ -167,8 +167,9 @@ jsJoystick::jsJoystick(int ident) :
|
|||
|
||||
os = new struct os_specific_s;
|
||||
os->num_hats = 0;
|
||||
os->hidDev = nullptr;
|
||||
|
||||
// get the name now too
|
||||
// get the name now too
|
||||
CFDictionaryRef properties = getCFProperties(ioDevices[id]);
|
||||
CFTypeRef ref = CFDictionaryGetValue (properties, CFSTR(kIOHIDProductKey));
|
||||
if (!ref)
|
||||
|
|
Loading…
Add table
Reference in a new issue