diff --git a/Source/com/IUnknown.cpp b/Source/com/IUnknown.cpp index 862520145..01ac13c30 100644 --- a/Source/com/IUnknown.cpp +++ b/Source/com/IUnknown.cpp @@ -101,17 +101,19 @@ namespace ProxyStub { // ------------------------------------------------------------------------------------------- string UnknownProxy::LinkId() const { + string result(_T("/Dangling")); + _adminLock.Lock(); if (_channel.IsValid() == true) { const RPC::Communicator::Client* comchannel = dynamic_cast(_channel.operator->()); ASSERT(comchannel != nullptr); if (comchannel != nullptr) { - return (comchannel->Extension().Origin()); + result = comchannel->Extension().Origin(); } } _adminLock.Unlock(); - return (_T("/Dangling")); + return (result); } uint32_t UnknownProxy::Id() const {