forked from 0ad/0ad
Fix error when returning resources before having ever collected any
This was SVN commit r8904.
This commit is contained in:
parent
b73c544f2a
commit
a1ef809904
@ -105,7 +105,7 @@ ResourceGatherer.prototype.GetMainCarryingType = function()
|
|||||||
*/
|
*/
|
||||||
ResourceGatherer.prototype.GetLastCarriedType = function()
|
ResourceGatherer.prototype.GetLastCarriedType = function()
|
||||||
{
|
{
|
||||||
if (this.lastCarriedType.generic in this.carrying)
|
if (this.lastCarriedType && this.lastCarriedType.generic in this.carrying)
|
||||||
return this.lastCarriedType;
|
return this.lastCarriedType;
|
||||||
else
|
else
|
||||||
return undefined;
|
return undefined;
|
||||||
|
Loading…
Reference in New Issue
Block a user