Skip to content

Commit

Permalink
Add checks for marker parent
Browse files Browse the repository at this point in the history
Signed-off-by: Poh Zhi-Ee <[email protected]>
  • Loading branch information
pohzhiee committed Aug 13, 2020
1 parent e41be3a commit ddef663
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rendering/MarkerManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,10 @@ bool MarkerManagerPrivate::ProcessMarkerMsg(const ignition::msgs::Marker &_msg)
visualPtr->AddGeometry(markerPtr);

// Add visual to root visual
this->scene->RootVisual()->AddChild(visualPtr);
if (!visualPtr->HasParent())
{
this->scene->RootVisual()->AddChild(visualPtr);
}

// Store the visual
this->visuals[ns][id] = visualPtr;
Expand Down

0 comments on commit ddef663

Please sign in to comment.