mirror of
https://github.com/obsproject/obs-studio
synced 2024-10-24 00:21:34 +00:00
libobs: Null check hotkey device on macos
This commit is contained in:
parent
68bedcf1a9
commit
1819696198
|
@ -1754,6 +1754,10 @@ bool obs_hotkeys_platform_is_pressed(obs_hotkeys_platform_t *plat,
|
|||
IOHIDValueRef value = 0;
|
||||
IOHIDDeviceRef device = IOHIDElementGetDevice(element);
|
||||
|
||||
if (device == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (IOHIDDeviceGetValue(device, element, &value) !=
|
||||
kIOReturnSuccess) {
|
||||
i += 1;
|
||||
|
|
Loading…
Reference in a new issue