(OSX) Prevent crash

This commit is contained in:
Twinaphex 2016-11-30 05:06:50 +01:00
parent d3e4c1278a
commit 7197be5a0d

View File

@ -38,7 +38,12 @@ static bool hid_joypad_query_pad(unsigned pad)
static void hid_joypad_free(void)
{
generic_hid->free((void*)hid_driver_get_data());
if (!generic_hid)
return;
if (generic_hid->free)
generic_hid->free((void*)hid_driver_get_data());
generic_hid = NULL;
}