summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/CommunicatorI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/CommunicatorI.cpp')
-rw-r--r--cpp/src/Ice/CommunicatorI.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/Ice/CommunicatorI.cpp b/cpp/src/Ice/CommunicatorI.cpp
index f4fc8d20d3c..3ea9e32dd1c 100644
--- a/cpp/src/Ice/CommunicatorI.cpp
+++ b/cpp/src/Ice/CommunicatorI.cpp
@@ -100,7 +100,10 @@ Ice::CommunicatorI::destroy()
{
theCollector->stop();
}
- theCollector->collectGarbage(); // Collect whenever a communicator is destroyed.
+ if(theCollector)
+ {
+ theCollector->collectGarbage(); // Collect whenever a communicator is destroyed.
+ }
if(last)
{
if(gcTraceLevel)