Do nothing if the same interface gets set twice

This commit is contained in:
Bernhard Schelling 2023-06-28 21:41:59 +09:00 committed by LibretroAdmin
parent 5b1e28843e
commit 67836c144e

View File

@ -9229,6 +9229,10 @@ bool netplay_driver_ctl(enum rarch_netplay_ctl_state state, void *data)
if (net_st->core_netpacket_interface)
{
if (data && !memcmp(net_st->core_netpacket_interface,
data, sizeof(*net_st->core_netpacket_interface)))
break; /* interface is not modified */
free(net_st->core_netpacket_interface);
net_st->core_netpacket_interface = NULL;
}