Fix a bug in _UpdateList(), where the newest teams were not append at all due to
an out-of-range index passed to AddItem(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38832 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
619ccfae94
commit
7fa49587bc
@ -332,10 +332,10 @@ TeamsListView::_UpdateList()
|
||||
// Team not found in previously known teams list: insert a new item
|
||||
TeamListItem* newItem = new(std::nothrow) TeamListItem(tmi);
|
||||
if (newItem != NULL) {
|
||||
if (!item)
|
||||
index++; // No item found with bigger team id: insert at end
|
||||
|
||||
AddItem(newItem, index);
|
||||
if (!item) // No item found with bigger team id: append at end
|
||||
AddItem(newItem);
|
||||
else
|
||||
AddItem(newItem, index);
|
||||
}
|
||||
}
|
||||
index++; // Move list sync head.
|
||||
|
Loading…
Reference in New Issue
Block a user