fix crash in build palette keyboard handler after winning/losing

This commit is contained in:
Chris Forbes
2011-01-28 13:13:19 +13:00
parent a8d848b3c4
commit ce8d787a9c

View File

@@ -496,6 +496,8 @@ namespace OpenRA.Mods.RA.Widgets
bool DoBuildingHotkey(char c, World world)
{
if (!paletteOpen) return false;
if (CurrentQueue == null) return false;
var toBuild = CurrentQueue.BuildableItems().FirstOrDefault(b => b.Traits.Get<BuildableInfo>().Hotkey == c.ToString());
if ( toBuild != null )