Fix disconnects

This commit is contained in:
Tobias Fella
2022-10-23 23:23:56 +02:00
parent 67b53a898f
commit bbf76e1e64
3 changed files with 2 additions and 3 deletions

View File

@@ -102,7 +102,7 @@ ChatDocumentHandler::ChatDocumentHandler(QObject *parent)
m_completionModel->setRoom(m_room);
static NeoChatRoom *previousRoom = nullptr;
if (previousRoom) {
disconnect(nullptr, &NeoChatRoom::chatBoxTextChanged, this, nullptr);
disconnect(previousRoom, &NeoChatRoom::chatBoxTextChanged, this, nullptr);
}
previousRoom = m_room;
connect(m_room, &NeoChatRoom::chatBoxTextChanged, this, [this]() {