fix crash in build palette keyboard handler after winning/losing
This commit is contained in:
@@ -496,6 +496,8 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
bool DoBuildingHotkey(char c, World world)
|
bool DoBuildingHotkey(char c, World world)
|
||||||
{
|
{
|
||||||
if (!paletteOpen) return false;
|
if (!paletteOpen) return false;
|
||||||
|
if (CurrentQueue == null) return false;
|
||||||
|
|
||||||
var toBuild = CurrentQueue.BuildableItems().FirstOrDefault(b => b.Traits.Get<BuildableInfo>().Hotkey == c.ToString());
|
var toBuild = CurrentQueue.BuildableItems().FirstOrDefault(b => b.Traits.Get<BuildableInfo>().Hotkey == c.ToString());
|
||||||
|
|
||||||
if ( toBuild != null )
|
if ( toBuild != null )
|
||||||
|
|||||||
Reference in New Issue
Block a user