Made hid_close() NULL-tolerant.

This commit is contained in:
Alan Ott 2010-07-28 21:14:36 -04:00
parent d2c01f9000
commit 6983cb4da0

View File

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