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)
|
void ChatSectionController::setCurrentChatIndex(int index)
|
||||||
{
|
{
|
||||||
assert(index >= 0 && index < m_chats->size());
|
auto chat = index >= 0 && index < m_chats->size() ? m_chats->get(index) : ChatItemPtr();
|
||||||
|
|
||||||
auto chat = m_chats->get(index);
|
|
||||||
if (m_currentChat == chat)
|
if (m_currentChat == chat)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue