summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-30 20:47:45 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-30 20:47:45 +0000
commitec0d546b1b38bc4b4383647ee3f9a2f603dfd46e (patch)
tree051e2ea9e9d847d2571d28edc5d858a77b761206 /src/modules
parent5fb83b846dea3fd368aae4b8f8180f1f2bb4065c (diff)
fix for a crash after connection timeout
git-svn-id: http://svn.miranda-ng.org/main/trunk@13913 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/netlib/netlibopenconn.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/netlib/netlibopenconn.cpp b/src/modules/netlib/netlibopenconn.cpp
index 0e40641eec..7b9a892782 100644
--- a/src/modules/netlib/netlibopenconn.cpp
+++ b/src/modules/netlib/netlibopenconn.cpp
@@ -782,6 +782,10 @@ bool NetlibDoConnect(NetlibConnection *nlc)
bool NetlibReconnect(NetlibConnection *nlc)
{
+ // a connection might be freed already
+ if (GetNetlibHandleType(nlc) != NLH_CONNECTION)
+ return false;
+
char buf[4];
bool opened = nlc->s != INVALID_SOCKET;
if (opened) {