diff --git a/pdbApp/pvalink_link.cpp b/pdbApp/pvalink_link.cpp index cf15966..62e6f5b 100644 --- a/pdbApp/pvalink_link.cpp +++ b/pdbApp/pvalink_link.cpp @@ -89,7 +89,9 @@ pvd::PVField::const_shared_pointer pvaLink::getSubField(const char *name) } else { // we access a sub-struct ret = lchan->op_mon.root->getSubField(fieldName); - if(ret->getField()->getType()!=pvd::structure) { + if(!ret) { + // noop + } else if(ret->getField()->getType()!=pvd::structure) { // addressed sub-field isn't a sub-structure if(strcmp(name, "value")!=0) { // unless we are trying to fetch the "value", we fail here