Skip to content
Snippets Groups Projects
Commit 7aec8e21 authored by Dietrich Rothe's avatar Dietrich Rothe Committed by Martin Christoph Hierholzer
Browse files

use hasProcessVariable to query, instead of nullptr result

parent edb8ed77
No related branches found
No related tags found
No related merge requests found
......@@ -35,8 +35,11 @@ namespace ChimeraTK {
if(!statusCodeVariable)
throw ChimeraTK::logic_error("illegal/non-existing statusCodeSource: " + errorReportingInfo.statusCodeSource);
// this one is optional
ProcessArray<std::string>::SharedPtr statusStringVariable =
controlSystemPVManager_->getProcessArray<std::string>(errorReportingInfo.statusStringSource);
ProcessArray<std::string>::SharedPtr statusStringVariable;
if(controlSystemPVManager_->hasProcessVariable(errorReportingInfo.statusStringSource)) {
statusStringVariable =
controlSystemPVManager_->getProcessArray<std::string>(errorReportingInfo.statusStringSource);
}
statusHandler_.reset(new StatusHandler(this, updater_, statusCodeVariable, statusStringVariable));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment