diff options
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index 5c5821fdaad..a83e1f3e3ba 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -1461,9 +1461,10 @@ IceInternal::Instance::destroy() _metricsAdmin = 0; // Break cyclic reference counts. Don't clear _observer, it's immutable. - if(_observer) + CommunicatorObserverIPtr observer = CommunicatorObserverIPtr::dynamicCast(_observer); + if(observer) { - CommunicatorObserverIPtr::dynamicCast(_observer)->destroy(); + observer->destroy(); } } |