mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
fix: guard PartitionPresent getter against null sensor feedback
EssentialsPartitionController.PartitionPresent threw a NullReferenceException in Auto mode when the partition sensor's PartitionPresentFeedback was not yet initialized, breaking combiner fullStatus serialization to MC clients. Fall back to the last-known _partitionPresent value instead of dereferencing a null sensor feedback.
This commit is contained in:
parent
0ec6de3d66
commit
5a30461eaf
1 changed files with 1 additions and 1 deletions
|
|
@ -30,7 +30,7 @@ namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
if (IsInAutoMode)
|
if (IsInAutoMode)
|
||||||
{
|
{
|
||||||
return _partitionSensor.PartitionPresentFeedback.BoolValue;
|
return _partitionSensor?.PartitionPresentFeedback?.BoolValue ?? _partitionPresent;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _partitionPresent;
|
return _partitionPresent;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue