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 and ahcorde committed Jan 19, 2024
1 parent eda1c8c commit 967e53f
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 @@ -88,7 +88,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 @@ -259,7 +259,7 @@ void ImageViewNode::windowThread()
}
}

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

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

0 comments on commit 967e53f

Please sign in to comment.