Skip to content

Commit

Permalink
Merge pull request #59 from MichaelGrupp/fix-segfault
Browse files Browse the repository at this point in the history
Fix segfault caused by uninitialized publisher
  • Loading branch information
jlblancoc authored Dec 4, 2024
2 parents 5fb5eac + 2c7616f commit beaf86e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mvsim_node_src/mvsim_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,8 @@ void MVSimNode::internalOn(const mvsim::VehicleBase& veh, const mrpt::obs::CObse
#if PACKAGE_ROS_VERSION == 1
pubImg = mvsim_node::make_shared<ros::Publisher>(
n_.advertise<Msg_Image>(vehVarName(img_topic, veh), publisher_history_len_));
pubCamInfo = mvsim_node::make_shared<ros::Publisher>(
n_.advertise<Msg_CameraInfo>(vehVarName(camInfo_topic, veh), publisher_history_len_));
#else
pubImg = mvsim_node::make_shared<PublisherWrapper<Msg_Image>>(
n_, vehVarName(img_topic, veh), publisher_history_len_);
Expand Down

0 comments on commit beaf86e

Please sign in to comment.