diff --git a/image_tools/include/image_tools/cv_mat_sensor_msgs_image_type_adapter.hpp b/image_tools/include/image_tools/cv_mat_sensor_msgs_image_type_adapter.hpp index 04875b110..ac71289fe 100644 --- a/image_tools/include/image_tools/cv_mat_sensor_msgs_image_type_adapter.hpp +++ b/image_tools/include/image_tools/cv_mat_sensor_msgs_image_type_adapter.hpp @@ -120,6 +120,8 @@ class ROSCvMatContainer } else if (std::holds_alternative>(other.storage_)) { storage_ = std::make_unique( *std::get>(other.storage_)); + } else if (std::holds_alternative(other.storage_)) { + storage_ = nullptr; } } return *this;