mirror of
https://github.com/RPCS3/hidapi.git
synced 2025-02-18 17:57:53 +00:00
Made hid_close() NULL-tolerant.
This commit is contained in:
parent
d2c01f9000
commit
6983cb4da0
@ -494,9 +494,9 @@ int HID_API_EXPORT hid_get_feature_report(hid_device *dev, unsigned char *data,
|
||||
|
||||
void HID_API_EXPORT hid_close(hid_device *dev)
|
||||
{
|
||||
|
||||
if (!dev)
|
||||
return;
|
||||
close(dev->device_handle);
|
||||
|
||||
free(dev);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user