Skip to content

Commit

Permalink
check valid pointer (#2674)
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 authored Nov 12, 2024
1 parent 0d346de commit 57599fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/systems/optical_tactile_plugin/OpticalTactilePlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ void OpticalTactilePluginPrivate::Enable(const gz::msgs::Boolean &_req)

this->enabled = _req.data();

if (!_req.data())
if (!_req.data() && this->visualizePtr)
{
this->visualizePtr->RemoveNormalForcesAndContactsMarkers();
}
Expand Down

0 comments on commit 57599fb

Please sign in to comment.