summaryrefslogtreecommitdiffstats
path: root/Source/cmConnection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmConnection.cxx')
-rw-r--r--Source/cmConnection.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmConnection.cxx b/Source/cmConnection.cxx
index 89013dc..c0d1b82 100644
--- a/Source/cmConnection.cxx
+++ b/Source/cmConnection.cxx
@@ -118,7 +118,9 @@ void cmEventBasedConnection::OnDisconnect(int onerror)
{
(void)onerror;
this->OnConnectionShuttingDown();
- this->Server->OnDisconnect(this);
+ if (this->Server) {
+ this->Server->OnDisconnect(this);
+ }
}
cmConnection::~cmConnection()
@@ -127,6 +129,7 @@ cmConnection::~cmConnection()
bool cmConnection::OnConnectionShuttingDown()
{
+ this->Server = nullptr;
return true;
}