Fix crash on empty ribbons, required for what's coming next
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14506 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
5a7fb84267
commit
5ab8b2b563
@ -583,7 +583,7 @@ void RibbonWidget::unfocused(const int playerID, Widget* new_focus)
|
||||
{
|
||||
if (new_focus != NULL && new_focus != this && !m_children.contains(new_focus))
|
||||
{
|
||||
if (m_selection[playerID] != -1)
|
||||
if (m_selection[playerID] >= 0 && m_selection[playerID] < m_children.size())
|
||||
{
|
||||
m_children.get(m_selection[playerID])->unfocused(playerID, new_focus);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user