Skip to content

Commit 52c4bd0

Browse files
committed
fixed crash
1 parent 2713dd4 commit 52c4bd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ob_camera_node.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ void OBCameraNode::publishPointCloud(const std::shared_ptr<ob::FrameSet>& frame_
523523
}
524524

525525
void OBCameraNode::publishDepthPointCloud(const std::shared_ptr<ob::FrameSet>& frame_set) {
526-
if (depth_cloud_pub_.getNumSubscribers() == 0 || !enable_point_cloud_) {
526+
if (!enable_point_cloud_ || depth_cloud_pub_.getNumSubscribers() == 0) {
527527
return;
528528
}
529529
auto depth_frame = frame_set->depthFrame();
@@ -613,7 +613,7 @@ void OBCameraNode::publishDepthPointCloud(const std::shared_ptr<ob::FrameSet>& f
613613
}
614614

615615
void OBCameraNode::publishColoredPointCloud(const std::shared_ptr<ob::FrameSet>& frame_set) {
616-
if (depth_registered_cloud_pub_.getNumSubscribers() == 0 || !enable_colored_point_cloud_) {
616+
if (!enable_colored_point_cloud_ || depth_registered_cloud_pub_.getNumSubscribers() == 0) {
617617
return;
618618
}
619619
if (!depth_frame_) {

0 commit comments

Comments
 (0)