Fixes bug on object panel (assert fail when map was loaded before the panel was displayed).

This was SVN commit r10123.
This commit is contained in:
historic_bruno 2011-08-28 05:57:09 +00:00
parent 4185aa348a
commit 47e1e23721

View File

@ -280,10 +280,11 @@ private:
Append(m_Players[i]);
}
if (m_ObjectSettings.GetPlayerID() > numPlayers)
// The control may not have entries yet
if (m_ObjectSettings.GetPlayerID() >= GetCount())
{
// Invalid player
SetSelection((long)numPlayers);
SetSelection((long)GetCount()-1);
}
else
{