diff --git a/image_view/src/disparity_view_node.cpp b/image_view/src/disparity_view_node.cpp index 4bc04aaa9..f69f91db1 100644 --- a/image_view/src/disparity_view_node.cpp +++ b/image_view/src/disparity_view_node.cpp @@ -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) diff --git a/image_view/src/image_view_node.cpp b/image_view/src/image_view_node.cpp index c44ef55e8..a8bfdcd34 100644 --- a/image_view/src/image_view_node.cpp +++ b/image_view/src/image_view_node.cpp @@ -259,7 +259,7 @@ void ImageViewNode::windowThread() } } - cv::destroyWindow(window_name_); + cv::destroyAllWindows(); if (rclcpp::ok()) { rclcpp::shutdown();