Skip to content

Commit

Permalink
use cv::DestroyAllWindows (#863)
Browse files Browse the repository at this point in the history
This ports #816 to ROS 2 and prevents weird exit conditions if you
already closed the window
  • Loading branch information
mikeferguson authored Jan 19, 2024
1 parent ca363d9 commit 5645baa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion image_view/src/disparity_view_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ DisparityViewNode::DisparityViewNode(const rclcpp::NodeOptions & options)

DisparityViewNode::~DisparityViewNode()
{
cv::destroyWindow(window_name_);
cv::destroyAllWindows();
}

void DisparityViewNode::imageCb(const stereo_msgs::msg::DisparityImage::SharedPtr msg)
Expand Down
2 changes: 1 addition & 1 deletion image_view/src/image_view_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ void ImageViewNode::windowThread()
}
}

cv::destroyWindow(window_name_);
cv::destroyAllWindows();

if (rclcpp::ok()) {
rclcpp::shutdown();
Expand Down

0 comments on commit 5645baa

Please sign in to comment.