fixed client crash on removing friends. Closes #1077

This commit is contained in:
oy 2013-03-16 16:03:38 +01:00
parent 878af82d8f
commit b2a9e98bf4

View file

@ -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();