mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-24 13:05:39 +00:00
macOS: fix crash if and when joystick-init-on-add fails
This commit is contained in:
parent
a199cb89ad
commit
d88f3f5226
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue