1
0
forked from 0ad/0ad

Fixed missing cmpIdentity null check in Barter.js:60 (causes failure on Isthmus when territory_pull entity is iterated over). Fixes #1199.

This was SVN commit r11309.
This commit is contained in:
vts 2012-03-10 16:34:59 +00:00
parent 5282d77c19
commit 7934e3ab0b

View File

@ -57,7 +57,7 @@ Barter.prototype.PlayerHasMarket = function(playerEntity)
{
var cmpFoundation = Engine.QueryInterface(entity, IID_Foundation);
var cmpIdentity = Engine.QueryInterface(entity, IID_Identity);
if (!cmpFoundation && cmpIdentity.HasClass("BarterMarket"))
if (!cmpFoundation && cmpIdentity && cmpIdentity.HasClass("BarterMarket"))
return true;
}
return false;