diff options
Diffstat (limited to 'src/net_query.c')
-rw-r--r-- | src/net_query.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/net_query.c b/src/net_query.c index 06391a14..f9f4c918 100644 --- a/src/net_query.c +++ b/src/net_query.c @@ -528,10 +528,14 @@ static void NET_Query_QueryLoop(net_query_callback_t callback, void *user_data) void NET_Query_Init(void) { - query_context = NET_NewContext(); - NET_AddModule(query_context, &net_sdl_module); - net_sdl_module.InitClient(); + if (query_context == NULL) + { + query_context = NET_NewContext(); + NET_AddModule(query_context, &net_sdl_module); + net_sdl_module.InitClient(); + } + free(targets); targets = NULL; num_targets = 0; |