diff --git a/src/chat/notification/imdn.cpp b/src/chat/notification/imdn.cpp index 1ade4ff9e0d934eeaf393be940b45c10d9dc2915..f0b843921a3f848b5c4631a6ab76cafcc90d6e36 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 &) {} } // -----------------------------------------------------------------------------