mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 00:39:53 +00:00
In case last hatswitch does not match cookie
For the mayflash N64 adapter, I was getting a BAD EXC ADDRESS (in mac OS 10.13) for this line (tmp was NULL). Retroarch would crash in the gui if I pressed a button from the DPAD on controller 2. With this change, it no longer crashes in the gui and still registers the button push.
This commit is contained in:
parent
9c100ded3a
commit
1e751d00ea
@ -290,7 +290,7 @@ static void iohidmanager_hid_device_input_callback(void *data, IOReturn result,
|
||||
while (tmp && tmp->cookie != (IOHIDElementCookie)cookie)
|
||||
tmp = tmp->next;
|
||||
|
||||
if (tmp->cookie == (IOHIDElementCookie)cookie)
|
||||
if (tmp && tmp->cookie == (IOHIDElementCookie)cookie)
|
||||
{
|
||||
CFIndex min = IOHIDElementGetLogicalMin(element);
|
||||
CFIndex range = IOHIDElementGetLogicalMax(element) - min;
|
||||
|
Loading…
x
Reference in New Issue
Block a user