Skip to content
Snippets Groups Projects
Commit 7c0d9823 authored by Mirko Wächter's avatar Mirko Wächter
Browse files

RemoteRobot: Null Nodes were not retrieved again

parent 60c345af
No related branches found
No related tags found
No related merge requests found
......@@ -96,19 +96,19 @@ namespace armarx
RobotNodePtr RemoteRobot::getRobotNode(const string& robotNodeName)
{
DMES((format("Node: %1%") % robotNodeName));
if (_cachedNodes.find(robotNodeName) == _cachedNodes.end())
auto it = _cachedNodes.find(robotNodeName);
if (it == _cachedNodes.end() || it->second == NULL)
{
DMES("No cache hit");
_cachedNodes[robotNodeName] = RemoteRobot::createRemoteRobotNode(_robot->getRobotNode(robotNodeName),
shared_from_this());
return _cachedNodes[robotNodeName];
}
else
{
DMES("Cache hit");
return it->second;
}
return _cachedNodes[robotNodeName];
}
void RemoteRobot::getRobotNodes(vector< RobotNodePtr >& storeNodes, bool clearVector)
......
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