Fix closure issue with mission objectives. Fixes #6680.

This commit is contained in:
Paul Chote
2014-10-06 18:49:36 +13:00
parent 2f4a267ba7
commit a77714f98b

View File

@@ -53,8 +53,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
{
parent.RemoveChildren();
foreach (var objective in mo.Objectives.OrderBy(o => o.Type))
foreach (var o in mo.Objectives.OrderBy(o => o.Type))
{
var objective = o; // Work around the loop closure issue in older versions of C#
var widget = template.Clone();
var label = widget.Get<LabelWidget>("OBJECTIVE_TYPE");