[PATCH] Groups portrait - can't convert undefined to object
The following error stack was repeated onTick in an alpha 21 (r18802), reported by bb :
ERROR: JavaScript error: gui/session/session.js line 900
TypeError: can't convert undefined to object
updateGroups/getCostSum@gui/session/session.js:900:10
updateGroups/icon<@gui/session/session.js:918:13
updateGroups@gui/session/session.js:916:31
updateGUIObjects@gui/session/session.js:722:2
onSimulationUpdate@gui/session/session.js:677:2
__eventhandler116 (simulationupdate)@sn simulationupdate:0:1
It occured twice to bb (who got defeated and became an observer), when having a controlgroup on a hero garrisoned in a ship and (if he recalls correctly), when a hero garrisoned in a CC was selected. However we found no way to reproduce it yet.
The affected code comes from r18728, #2163.
To reproduce: change perspective to gaia, select to different resources and add them as control group