diff --git a/src/display/window_log.cc b/src/display/window_log.cc index e48865f4..9ab3016a 100644 --- a/src/display/window_log.cc +++ b/src/display/window_log.cc @@ -26,6 +26,7 @@ WindowLog::WindowLog(torrent::log_buffer* l) : } WindowLog::~WindowLog() { + m_log->lock_and_set_update_slot(nullptr); torrent::this_thread::scheduler()->erase(&m_task_update); } diff --git a/src/ui/element_log_complete.cc b/src/ui/element_log_complete.cc index 8eb30491..09986b17 100644 --- a/src/ui/element_log_complete.cc +++ b/src/ui/element_log_complete.cc @@ -26,6 +26,10 @@ ElementLogComplete::ElementLogComplete(torrent::log_buffer* l) : }); } +ElementLogComplete::~ElementLogComplete() { + m_log->lock_and_set_update_slot(nullptr); +} + void ElementLogComplete::activate(display::Frame* frame, [[maybe_unused]] bool focus) { if (is_active()) diff --git a/src/ui/element_log_complete.h b/src/ui/element_log_complete.h index ea9cdaad..b290f13e 100644 --- a/src/ui/element_log_complete.h +++ b/src/ui/element_log_complete.h @@ -18,6 +18,7 @@ public: typedef display::WindowLogComplete WLogComplete; ElementLogComplete(torrent::log_buffer* l); + virtual ~ElementLogComplete(); void activate(display::Frame* frame, bool focus = true); void disable();