diff --git a/ecal/core/src/pubsub/ecal_publisher.cpp b/ecal/core/src/pubsub/ecal_publisher.cpp index b5637d5c17..67da6f2cd8 100644 --- a/ecal/core/src/pubsub/ecal_publisher.cpp +++ b/ecal/core/src/pubsub/ecal_publisher.cpp @@ -49,6 +49,9 @@ namespace eCAL CPublisher::~CPublisher() { + // could be already destroyed by move + if (m_publisher_impl == nullptr) return; + // unregister publisher if (g_pubgate() != nullptr) g_pubgate()->Unregister(m_publisher_impl->GetTopicName(), m_publisher_impl);