Fix for null ref exception after refinery is sold.
This commit is contained in:
@@ -148,7 +148,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
// Check that we're not in a critical location and being useless (refinery drop-off):
|
// Check that we're not in a critical location and being useless (refinery drop-off):
|
||||||
var lastproc = LastLinkedProc ?? LinkedProc;
|
var lastproc = LastLinkedProc ?? LinkedProc;
|
||||||
if (lastproc != null)
|
if (lastproc != null && !lastproc.Destroyed)
|
||||||
{
|
{
|
||||||
var deliveryLoc = lastproc.Location + lastproc.Trait<IAcceptOre>().DeliverOffset;
|
var deliveryLoc = lastproc.Location + lastproc.Trait<IAcceptOre>().DeliverOffset;
|
||||||
if (self.Location == deliveryLoc)
|
if (self.Location == deliveryLoc)
|
||||||
|
|||||||
Reference in New Issue
Block a user