From 96f7da6adf5d4b6eb7b6ab66bd1758a2b14d1efa Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 18 Sep 2011 14:16:27 +0000 Subject: Hook query code into setup tool, and add search results window. Subversion-branch: /branches/v2-branch Subversion-revision: 2383 --- src/net_query.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/net_query.c') 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; -- cgit v1.2.3