summaryrefslogtreecommitdiff
path: root/src/net_query.c
diff options
context:
space:
mode:
authorSimon Howard2011-09-18 14:16:27 +0000
committerSimon Howard2011-09-18 14:16:27 +0000
commit96f7da6adf5d4b6eb7b6ab66bd1758a2b14d1efa (patch)
tree4ae7dd32a8ce3da3f44c67b31c12b1ea242dad62 /src/net_query.c
parent4dc7b33e17069c6559e9b1b7cc1ecd878162f629 (diff)
downloadchocolate-doom-96f7da6adf5d4b6eb7b6ab66bd1758a2b14d1efa.tar.gz
chocolate-doom-96f7da6adf5d4b6eb7b6ab66bd1758a2b14d1efa.tar.bz2
chocolate-doom-96f7da6adf5d4b6eb7b6ab66bd1758a2b14d1efa.zip
Hook query code into setup tool, and add search results window.
Subversion-branch: /branches/v2-branch Subversion-revision: 2383
Diffstat (limited to 'src/net_query.c')
-rw-r--r--src/net_query.c10
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;