From 12e8deedb497b0a77d1a523b29a4e69a6daa60a1 Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Wed, 25 Jan 2017 22:08:05 -0500 Subject: [PATCH] Only disable netplay in deinit_netplay if it was actually on --- network/netplay/netplay_frontend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index d410178e91..ced97d8cee 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -883,9 +883,11 @@ bool netplay_disconnect(netplay_t *netplay) void deinit_netplay(void) { if (netplay_data) + { netplay_free(netplay_data); + netplay_enabled = false; + } netplay_data = NULL; - netplay_enabled = false; core_unset_netplay_callbacks(); }