client search: cleanup context pointer handling

This commit is contained in:
Michael Davidsaver
2018-03-28 11:25:54 -07:00
parent 8d363f9fe7
commit aec1c7c9d7
2 changed files with 13 additions and 10 deletions

View File

@@ -2586,7 +2586,10 @@ public:
// reads CIDs
// TODO optimize
std::tr1::shared_ptr<epics::pvAccess::ChannelSearchManager> csm = _context.lock()->getChannelSearchManager();
ClientContextImpl::shared_pointer context(_context.lock());
if(!context)
return;
std::tr1::shared_ptr<epics::pvAccess::ChannelSearchManager> csm = context->getChannelSearchManager();
int16 count = payloadBuffer->getShort();
for (int i = 0; i < count; i++)
{