Skip to content

Commit

Permalink
Proposed fix for Issue IntelRealSense#19 (double free)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcurfman committed Feb 27, 2017
1 parent 0051a35 commit 5338a11
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions realsense_ros_camera/src/camera_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@ namespace realsense_ros_camera
device->stop();
}
ctx.reset();

const rs::stream All[] = { rs::stream::depth, rs::stream::color, rs::stream::fisheye };
for ( const auto stream : All )
{
if( false == enable_[stream])
continue;
image_publishers_[stream].shutdown();
}
image_publishers_.clear();
}

private:
Expand Down

0 comments on commit 5338a11

Please sign in to comment.