From 54b5da3460ca49f2707b4f8b99ce5b8564593c1d Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 12 Jul 2014 14:10:29 +1200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20crash=20if=20there=20are=20no?= =?UTF-8?q?=20production=20icons.=20Fixes=20#5543.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenRA.Mods.RA/Widgets/ProductionPaletteWidget.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Widgets/ProductionPaletteWidget.cs b/OpenRA.Mods.RA/Widgets/ProductionPaletteWidget.cs index a5d37053f2..5458939f74 100644 --- a/OpenRA.Mods.RA/Widgets/ProductionPaletteWidget.cs +++ b/OpenRA.Mods.RA/Widgets/ProductionPaletteWidget.cs @@ -199,7 +199,7 @@ namespace OpenRA.Mods.RA.Widgets i++; } - eventBounds = icons.Keys.Aggregate(Rectangle.Union); + eventBounds = icons.Any() ? icons.Keys.Aggregate(Rectangle.Union) : Rectangle.Empty; } public override void Draw()