diff options
author | Simon Howard | 2010-12-04 20:34:39 +0000 |
---|---|---|
committer | Simon Howard | 2010-12-04 20:34:39 +0000 |
commit | 863afa816738407f639618fb43659b97dcc3430d (patch) | |
tree | eaaa99fd1371b75a587ee969308009f5bce84a9f | |
parent | 0ff67f43d6d13d9675e305abc652188ea95a88fe (diff) | |
download | chocolate-doom-863afa816738407f639618fb43659b97dcc3430d.tar.gz chocolate-doom-863afa816738407f639618fb43659b97dcc3430d.tar.bz2 chocolate-doom-863afa816738407f639618fb43659b97dcc3430d.zip |
Fix bug when running with -server option.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2190
-rw-r--r-- | src/net_loop.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/net_loop.c b/src/net_loop.c index abba96e0..b8387794 100644 --- a/src/net_loop.c +++ b/src/net_loop.c @@ -137,9 +137,16 @@ static void NET_CL_FreeAddress(net_addr_t *addr) static net_addr_t *NET_CL_ResolveAddress(char *address) { - client_addr.module = &net_loop_client_module; + if (address == NULL) + { + client_addr.module = &net_loop_client_module; - return &client_addr; + return &client_addr; + } + else + { + return NULL; + } } net_module_t net_loop_client_module = @@ -206,8 +213,15 @@ static void NET_SV_FreeAddress(net_addr_t *addr) static net_addr_t *NET_SV_ResolveAddress(char *address) { - server_addr.module = &net_loop_server_module; - return &server_addr; + if (address == NULL) + { + server_addr.module = &net_loop_server_module; + return &server_addr; + } + else + { + return NULL; + } } net_module_t net_loop_server_module = |