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]>
(cherry picked from commit 57599fb)
  • Loading branch information
iche033 committed Nov 12, 2024
1 parent c298007 commit 9889df4
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 @@ -630,7 +630,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 9889df4

Please sign in to comment.