mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix error when single light sensor has no sector
This commit is contained in:
parent
d410a429fe
commit
8edc801903
@ -356,7 +356,10 @@ namespace NewHorizons.Builder.Props
|
|||||||
singleLightSensor._sector.OnSectorOccupantsUpdated -= singleLightSensor.OnSectorOccupantsUpdated;
|
singleLightSensor._sector.OnSectorOccupantsUpdated -= singleLightSensor.OnSectorOccupantsUpdated;
|
||||||
}
|
}
|
||||||
singleLightSensor._sector = sector;
|
singleLightSensor._sector = sector;
|
||||||
singleLightSensor._sector.OnSectorOccupantsUpdated += singleLightSensor.OnSectorOccupantsUpdated;
|
if (singleLightSensor._sector != null)
|
||||||
|
{
|
||||||
|
singleLightSensor._sector.OnSectorOccupantsUpdated += singleLightSensor.OnSectorOccupantsUpdated;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user