We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9da31e0 commit ec07576Copy full SHA for ec07576
src/joystick/hidapi/SDL_hidapijoystick.c
@@ -890,10 +890,8 @@ static SDL_HIDAPI_Device *HIDAPI_AddDevice(const struct SDL_hid_device_info *inf
890
return NULL;
891
}
892
device->magic = &SDL_HIDAPI_device_magic;
893
- device->path = SDL_strdup(info->path);
894
- if (!device->path) {
895
- SDL_free(device);
896
- return NULL;
+ if (info->path) {
+ device->path = SDL_strdup(info->path);
897
898
device->seen = SDL_TRUE;
899
device->vendor_id = info->vendor_id;
0 commit comments