Skip to content
Snippets Groups Projects
Commit 93917936 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

hotfix getStateBlock()

parent cc4ae0bb
No related branches found
No related tags found
No related merge requests found
Pipeline #4884 passed
......@@ -140,14 +140,14 @@ const std::string& CaptureBase::getStructure() const
StateBlockPtr CaptureBase::getStateBlock(const std::string& _key) const
{
if (getSensor())
if (getSensor() and getSensor()->getStateBlock(_key))
{
if (getSensor()->getO() and getSensor()->isStateBlockDynamic(_key))
if (getSensor()->isStateBlockDynamic(_key))
return HasStateBlocks::getStateBlock(_key);
else
return getSensor()->getStateBlock(_key);
}
else // No sensor associated: assume sensor params are here
else // No sensor associated, or sensor without this state block: assume sensor params are here
return HasStateBlocks::getStateBlock(_key);
}
......
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