Skip to content

Commit

Permalink
macOS: fix crash if and when joystick-init-on-add fails
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLudwig committed Feb 5, 2020
1 parent a199cb8 commit d88f3f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/joystick/darwin/SDL_sysjoystick.c
Expand Up @@ -137,7 +137,7 @@ FreeDevice(recDevice *removeDevice)

if ( gpDeviceList == removeDevice ) {
gpDeviceList = pDeviceNext;
} else {
} else if (gpDeviceList) {
recDevice *device = gpDeviceList;
while (device->pNext != removeDevice) {
device = device->pNext;
Expand Down

0 comments on commit d88f3f5

Please sign in to comment.