From c26a6a9661c0ac728780f5608e38ac575b89db27 Mon Sep 17 00:00:00 2001 From: Erwan Croze <erwan.croze@belledonne-communications.com> Date: Tue, 13 Nov 2018 11:40:17 +0100 Subject: [PATCH] Fix catch exception in Imdn destructor --- src/chat/notification/imdn.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/chat/notification/imdn.cpp b/src/chat/notification/imdn.cpp index 1ade4ff9e0..f0b843921a 100644 --- a/src/chat/notification/imdn.cpp +++ b/src/chat/notification/imdn.cpp @@ -42,7 +42,9 @@ Imdn::Imdn (ChatRoom *chatRoom) : chatRoom(chatRoom) { Imdn::~Imdn () { stopTimer(); - chatRoom->getCore()->getPrivate()->unregisterListener(this); + try { + chatRoom->getCore()->getPrivate()->unregisterListener(this); + } catch (const bad_weak_ptr &) {} } // ----------------------------------------------------------------------------- -- GitLab