Don't crash when trying to leave empty room
BUG: 474490
This commit is contained in:
@@ -320,6 +320,9 @@ void RoomManager::reset()
|
|||||||
|
|
||||||
void RoomManager::leaveRoom(NeoChatRoom *room)
|
void RoomManager::leaveRoom(NeoChatRoom *room)
|
||||||
{
|
{
|
||||||
|
if (!room) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (m_lastCurrentRoom && room->id() == m_lastCurrentRoom->id()) {
|
if (m_lastCurrentRoom && room->id() == m_lastCurrentRoom->id()) {
|
||||||
m_lastCurrentRoom = nullptr;
|
m_lastCurrentRoom = nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user