diff options
Diffstat (limited to 'cpp/src/Ice/OutgoingAsync.cpp')
-rw-r--r-- | cpp/src/Ice/OutgoingAsync.cpp | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp index 3cfa59968d5..d2509add681 100644 --- a/cpp/src/Ice/OutgoingAsync.cpp +++ b/cpp/src/Ice/OutgoingAsync.cpp @@ -419,37 +419,25 @@ IceInternal::OutgoingAsync::warning(const std::exception& ex) const void IceInternal::OutgoingAsync::warning() const { - if(_reference->instance->properties()->getPropertyAsIntWithDefault("Ice.Warn.AMICallback", 1) > 0) + if(_reference) // Don't print anything if cleanup() was already called. { - Warning out(_reference->instance->logger()); - out << "unknown exception raised by AMI callback"; + if(_reference->instance->properties()->getPropertyAsIntWithDefault("Ice.Warn.AMICallback", 1) > 0) + { + Warning out(_reference->instance->logger()); + out << "unknown exception raised by AMI callback"; + } } } void IceInternal::OutgoingAsync::cleanup() { - if(_reference) - { - _reference = 0; - } - - if(_connection) - { - _connection = 0; - } - - if(__is) - { - delete __is; - __is = 0; - } - - if(__os) - { - delete __os; - __os = 0; - } + _reference = 0; + _connection = 0; + delete __is; + __is = 0; + delete __os; + __os = 0; _monitor.notify(); } |