diff --git a/image_view/src/disparity_view_node.cpp b/image_view/src/disparity_view_node.cpp index be0805676..440b91869 100644 --- a/image_view/src/disparity_view_node.cpp +++ b/image_view/src/disparity_view_node.cpp @@ -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) diff --git a/image_view/src/image_view_node.cpp b/image_view/src/image_view_node.cpp index 9999ec0ad..5a4356e78 100644 --- a/image_view/src/image_view_node.cpp +++ b/image_view/src/image_view_node.cpp @@ -288,7 +288,7 @@ void ImageViewNode::windowThread() } } - cv::destroyWindow(window_name_); + cv::destroyAllWindows(); if (rclcpp::ok()) { rclcpp::shutdown();