|
@@ -592,8 +592,8 @@ RAWINPUT_JoystickOpen(SDL_Joystick * joystick, int device_index)
|
|
}
|
|
}
|
|
|
|
|
|
if (!device->driver->OpenJoystick(&device->hiddevice, joystick)) {
|
|
if (!device->driver->OpenJoystick(&device->hiddevice, joystick)) {
|
|
- /* Only possible error is out of memory */
|
|
|
|
- return SDL_OutOfMemory();
|
|
|
|
|
|
+ SDL_free(hwdata);
|
|
|
|
+ return -1;
|
|
}
|
|
}
|
|
|
|
|
|
hwdata->reserved = (void*)-1; /* crash if some code slips by that tries to use this */
|
|
hwdata->reserved = (void*)-1; /* crash if some code slips by that tries to use this */
|