diff --git a/src/roommanager.cpp b/src/roommanager.cpp index c8b7fbe00..8b92d531b 100644 --- a/src/roommanager.cpp +++ b/src/roommanager.cpp @@ -125,7 +125,7 @@ void RoomManager::openRoomForActiveConnection() void RoomManager::enterRoom(NeoChatRoom *room) { - if (m_chatDocumentHandler) { + if (m_currentRoom && m_chatDocumentHandler) { // We're doing these things here because it is critical that they are switched at the same time m_currentRoom->setSavedText(m_chatDocumentHandler->document()->textDocument()->toPlainText()); m_chatDocumentHandler->setRoom(room);