Merge pull request #13076 from gblues/gblues/ds3-osx-crash-fix

Fix crash when connecting DS3 to Mac
This commit is contained in:
Autechre 2021-10-06 09:05:35 +02:00 committed by GitHub
commit a611469f94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,7 +118,9 @@ static void *ds3_pad_init(void *data, uint32_t slot, hid_driver_t *driver)
int errors = 0;
ds3_instance_t *instance = (ds3_instance_t *)calloc(1, sizeof(ds3_instance_t));
driver->set_protocol(data, 1);
if(driver->set_protocol) {
driver->set_protocol(data, 1);
}
if (ds3_send_control_packet(data, slot, driver) < 0)
errors++;