Fix crash after login

This commit is contained in:
Nikita Karpei
2023-02-05 05:45:57 +02:00
committed by Tobias Fella
parent f1b9d2329f
commit c0ea52c331

View File

@@ -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);