Fix error when returning resources before having ever collected any

This was SVN commit r8904.
This commit is contained in:
Ykkrosh 2011-02-10 23:09:28 +00:00
parent b73c544f2a
commit a1ef809904

View File

@ -105,7 +105,7 @@ ResourceGatherer.prototype.GetMainCarryingType = function()
*/
ResourceGatherer.prototype.GetLastCarriedType = function()
{
if (this.lastCarriedType.generic in this.carrying)
if (this.lastCarriedType && this.lastCarriedType.generic in this.carrying)
return this.lastCarriedType;
else
return undefined;