mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 17:36:25 +00:00
macOS: fix crash if and when joystick-init-on-add fails
This commit is contained in:
@@ -137,7 +137,7 @@ FreeDevice(recDevice *removeDevice)
|
|||||||
|
|
||||||
if ( gpDeviceList == removeDevice ) {
|
if ( gpDeviceList == removeDevice ) {
|
||||||
gpDeviceList = pDeviceNext;
|
gpDeviceList = pDeviceNext;
|
||||||
} else {
|
} else if (gpDeviceList) {
|
||||||
recDevice *device = gpDeviceList;
|
recDevice *device = gpDeviceList;
|
||||||
while (device->pNext != removeDevice) {
|
while (device->pNext != removeDevice) {
|
||||||
device = device->pNext;
|
device = device->pNext;
|
||||||
|
Reference in New Issue
Block a user