Merge pull request #985 from lioncash/free

command: Fix possible null dereference in rarch_cmd_free
This commit is contained in:
Twinaphex 2014-09-12 15:12:09 +02:00
commit ee07c69c20

View File

@ -161,7 +161,7 @@ error:
void rarch_cmd_free(rarch_cmd_t *handle)
{
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
if (handle->net_fd >= 0)
if (handle && handle->net_fd >= 0)
close(handle->net_fd);
#endif