Skip to content

Commit

Permalink
unknown marker is ignored and does not crash rviz anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
jgueldenstein committed Aug 3, 2018
1 parent d30cda4 commit 9c15d9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rviz/default_plugin/marker_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,10 @@ void MarkerDisplay::processAdd( const visualization_msgs::Marker::ConstPtr& mess
if ( create )
{
marker.reset(createMarker(message->type, this, context_, scene_node_));
if (!marker) {
ROS_ERROR( "Unknown marker type: %d", message->type );
if (marker)
{
markers_.insert(std::make_pair(MarkerID(message->ns, message->id), marker));
}
markers_.insert(std::make_pair(MarkerID(message->ns, message->id), marker));
}

if (marker)
Expand Down

0 comments on commit 9c15d9a

Please sign in to comment.