Skip to content

Commit

Permalink
Fixed null reference bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesDunne committed Jun 27, 2012
1 parent 8e60210 commit f8a0dd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenRA.Mods.RA/Activities/FindResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public override Activity Tick(Actor self)
var territory = self.World.WorldActor.TraitOrDefault<ResourceClaimLayer>();

// Determine where to search from and how far to search:
var searchFromLoc = harv.LastOrderLocation ?? harv.LinkedProc.Location;
var searchFromLoc = harv.LastOrderLocation ?? (harv.LastLinkedProc ?? harv.LinkedProc ?? self).Location;
int searchRadius = harv.LastOrderLocation.HasValue ? harvInfo.SearchFromOrderRadius : harvInfo.SearchFromProcRadius;
int searchRadiusSquared = searchRadius * searchRadius;

Expand Down

0 comments on commit f8a0dd5

Please sign in to comment.