mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed client crash on removing friends. Closes #1077
This commit is contained in:
parent
878af82d8f
commit
b2a9e98bf4
|
@ -806,6 +806,8 @@ void CMenus::RenderServerbrowserFriends(CUIRect View)
|
|||
|
||||
// friends list(remove friend)
|
||||
static float s_ScrollValue = 0;
|
||||
if(m_FriendlistSelectedIndex >= m_lFriends.size())
|
||||
m_FriendlistSelectedIndex = m_lFriends.size()-1;
|
||||
UiDoListboxStart(&m_lFriends, &List, 30.0f, "", "", m_lFriends.size(), 1, m_FriendlistSelectedIndex, s_ScrollValue);
|
||||
|
||||
m_lFriends.sort_range();
|
||||
|
|
Loading…
Reference in a new issue