summaryrefslogtreecommitdiff
path: root/src/network/core
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-20 16:51:55 +0000
committerrubidium <rubidium@openttd.org>2009-01-20 16:51:55 +0000
commiteeb38a8e3a2e76e4fed25def77a2ee4d0fae2b27 (patch)
treef9dd4fc7b570b06c529e9e2384c58c0dd92f2003 /src/network/core
parent3d35b3c2cc8b227d0cc2df61b4e8dbd70b6a78f1 (diff)
downloadopenttd-eeb38a8e3a2e76e4fed25def77a2ee4d0fae2b27.tar.xz
(svn r15176) -Fix [FS#2554]: querying the content server could free when resolving the hostname or connecting takes long/is timing out.
Diffstat (limited to 'src/network/core')
-rw-r--r--src/network/core/tcp_content.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/core/tcp_content.h b/src/network/core/tcp_content.h
index 60f68d933..e084f5fc7 100644
--- a/src/network/core/tcp_content.h
+++ b/src/network/core/tcp_content.h
@@ -191,9 +191,9 @@ public:
* @param sin IP etc. of the client
*/
NetworkContentSocketHandler(SOCKET s, const struct sockaddr_in *sin) :
- NetworkTCPSocketHandler(s),
- client_addr(*sin)
+ NetworkTCPSocketHandler(s)
{
+ if (sin != NULL) this->client_addr = *sin;
}
/** On destructing of this class, the socket needs to be closed */