mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-22 19:48:52 +00:00
fix(CPP): fix crash on login
This commit is contained in:
parent
464476d135
commit
b23414e999
@ -33,9 +33,7 @@ ChatItem* ChatSectionController::currentChat() const
|
||||
|
||||
void ChatSectionController::setCurrentChatIndex(int index)
|
||||
{
|
||||
assert(index >= 0 && index < m_chats->size());
|
||||
|
||||
auto chat = m_chats->get(index);
|
||||
auto chat = index >= 0 && index < m_chats->size() ? m_chats->get(index) : ChatItemPtr();
|
||||
if (m_currentChat == chat)
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user