pvget/pvinfo check for NULL channel

This commit is contained in:
Michael Davidsaver
2018-01-31 08:42:26 -08:00
parent c6b1786008
commit b05ec689d0
2 changed files with 3 additions and 0 deletions

View File

@ -565,6 +565,8 @@ int main (int argc, char *argv[])
std::cerr<<"Provider "<<uri.protocol<<" can't create channel \""<<pvs[n]<<"\"\n";
return 1;
}
if(!channel)
continue;
chan_cache[pvs[n]] = channel;
} else {
channel = it->second;

View File

@ -190,6 +190,7 @@ int main (int argc, char *argv[])
for (int n = 0; n < nPvs; n++)
{
Channel::shared_pointer channel = channels[n];
if(!channel) continue;
TR1::shared_ptr<GetFieldRequesterImpl> getFieldRequesterImpl(new GetFieldRequesterImpl(channel));
channel->getField(getFieldRequesterImpl, "");