From 47e1e2372172a5f77266a5007a361b0321612c90 Mon Sep 17 00:00:00 2001 From: historic_bruno Date: Sun, 28 Aug 2011 05:57:09 +0000 Subject: [PATCH] Fixes bug on object panel (assert fail when map was loaded before the panel was displayed). This was SVN commit r10123. --- .../atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp index 81373fb859..604449dba3 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp @@ -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 {