summaryrefslogtreecommitdiffstats
path: root/Source/cmConnection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmConnection.cxx')
-rw-r--r--Source/cmConnection.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmConnection.cxx b/Source/cmConnection.cxx
index bc29e41..6cf8e5b 100644
--- a/Source/cmConnection.cxx
+++ b/Source/cmConnection.cxx
@@ -144,9 +144,12 @@ bool cmConnection::OnServeStart(std::string* errString)
bool cmEventBasedConnection::OnConnectionShuttingDown()
{
- this->WriteStream->data = nullptr;
- this->ReadStream->data = nullptr;
-
+ if (this->WriteStream) {
+ this->WriteStream->data = nullptr;
+ }
+ if (this->ReadStream) {
+ this->ReadStream->data = nullptr;
+ }
this->ReadStream = nullptr;
this->WriteStream = nullptr;
return true;