Merge pull request #10545 from aschain/maylashN64-fix

Fix for mayflash N64 adapter
This commit is contained in:
Autechre 2020-04-30 20:09:45 +02:00 committed by GitHub
commit fb28c79e13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;