1
1
forked from 0ad/0ad

prevent error when switching perspective to gaia

This was SVN commit r16145.
This commit is contained in:
mimo 2015-01-12 22:03:03 +00:00
parent e916c7e91f
commit 528ed2d15e

View File

@ -648,7 +648,10 @@ GuiInterface.prototype.GetStartedResearch = function(player)
GuiInterface.prototype.GetBattleState = function(player)
{
var cmpBattleDetection = QueryPlayerIDInterface(player, IID_BattleDetection);
return cmpBattleDetection.GetState();
if (cmpBattleDetection)
return cmpBattleDetection.GetState();
else
return false;
};
// Returns a list of ongoing attacks against the player.