Skip to content

Commit

Permalink
fix(CPP): fix crash on login
Browse files Browse the repository at this point in the history
  • Loading branch information
MishkaRogachev committed Aug 24, 2022
1 parent 464476d commit b23414e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions libs/ChatSection/src/ChatSectionController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b23414e

Please sign in to comment.