diff options
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/network.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/toxcore/network.c b/toxcore/network.c index 3f297ad7..e5a58331 100644 --- a/toxcore/network.c +++ b/toxcore/network.c | |||
@@ -956,6 +956,10 @@ Networking_Core *new_networking_ex(const Logger *log, IP ip, uint16_t port_from, | |||
956 | 956 | ||
957 | Networking_Core *new_networking_no_udp(const Logger *log) | 957 | Networking_Core *new_networking_no_udp(const Logger *log) |
958 | { | 958 | { |
959 | if (networking_at_startup() != 0) { | ||
960 | return nullptr; | ||
961 | } | ||
962 | |||
959 | /* this is the easiest way to completely disable UDP without changing too much code. */ | 963 | /* this is the easiest way to completely disable UDP without changing too much code. */ |
960 | Networking_Core *net = (Networking_Core *)calloc(1, sizeof(Networking_Core)); | 964 | Networking_Core *net = (Networking_Core *)calloc(1, sizeof(Networking_Core)); |
961 | 965 | ||