1
0
Fork 0

Fix a crash on macOS if a joystick fails to open

This commit is contained in:
James Turner 2020-12-17 13:53:00 +00:00
parent a092902483
commit fe17cfc84d

View file

@ -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)