summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Proxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Proxy.cpp')
-rw-r--r--cpp/src/Ice/Proxy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index 2d7ef940fa7..f455f5e6361 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -1644,10 +1644,10 @@ void
IceProxy::Ice::Object::__setRequestHandler(const ::IceInternal::RequestHandlerPtr& previous,
const ::IceInternal::RequestHandlerPtr& handler)
{
- if(_reference->getCacheConnection())
+ if(_reference->getCacheConnection() && previous)
{
IceUtil::Mutex::Lock sync(_mutex);
- if(_requestHandler.get() != handler.get())
+ if(_requestHandler && _requestHandler.get() != handler.get())
{
//
// Update the request handler only if "previous" is the same