Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/rendering/RenderUtil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3797,6 +3797,14 @@ void RenderUtilPrivate::CreateVisual(
sdf::Visual visual;
visual.SetName(_name->Data());
visual.SetRawPose(_pose->Data());
if(!_geom)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this check can be moved to the start of the function, i.e. before sdf::Visual visual

{
gzwarn << "Visual entity [" << _entity
<< "] has no geometry component."
<< "Skipping visual creation."
<< std::endl;
return;
}
visual.SetGeom(_geom->Data());
visual.SetCastShadows(_castShadows->Data());
visual.SetTransparency(_transparency->Data());
Expand Down
Loading