diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 0f7816134c5..39f6413007c 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -266,8 +266,11 @@ void CJabberProto::ServerThread(JABBER_CONN_DATA *pParam) // quit all chatrooms (will send quit message) LISTFOREACH(i, this, LIST_CHATROOM) - if (auto *item = ListGetItemPtrFromIndex(i)) + if (auto *item = ListGetItemPtrFromIndex(i)) { + if (item->si) + item->si->arEvents.destroy(); GcQuit(item, 0, nullptr); + } ListRemoveList(LIST_CHATROOM); ListRemoveList(LIST_BOOKMARK);