summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network.c3
-rw-r--r--network_udp.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/network.c b/network.c
index 1d461a7d0..91b99480e 100644
--- a/network.c
+++ b/network.c
@@ -1018,7 +1018,8 @@ void NetworkDisconnect(void)
}
}
- NetworkUDPRemoveAdvertise();
+ if (_network_advertise)
+ NetworkUDPRemoveAdvertise();
DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
diff --git a/network_udp.c b/network_udp.c
index 885ee1045..e9cf01425 100644
--- a/network_udp.c
+++ b/network_udp.c
@@ -555,7 +555,7 @@ void NetworkUDPRemoveAdvertise(void)
Packet *p;
/* Check if we are advertising */
- if (!_networking || !_network_server || !_network_udp_server || !_network_advertise)
+ if (!_networking || !_network_server || !_network_udp_server)
return;
/* check for socket */