Skip to content

Commit

Permalink
check for nullptr in destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
rex-schilasky committed Dec 13, 2024
1 parent 76494dd commit 396dd5e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ecal/core/src/pubsub/ecal_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 396dd5e

Please sign in to comment.