fixes #599 by checking for registration status before updating feedbacks

This commit is contained in:
Neil Dorin
2021-02-08 15:43:04 -07:00
parent e03b0dc1bb
commit 4f7ad4ccb9

View File

@@ -130,6 +130,12 @@ namespace PepperDash.Essentials.Core
void Hardware_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) void Hardware_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args)
{ {
Debug.Console(2, this, "OnlineStatusChange Event. Online = {0}", args.DeviceOnLine); Debug.Console(2, this, "OnlineStatusChange Event. Online = {0}", args.DeviceOnLine);
if (!Hardware.Registered)
{
return; // protects in cases where device has been unregistered and feedbacks would attempt to access null sigs.
}
foreach (var feedback in Feedbacks) foreach (var feedback in Feedbacks)
{ {
if (feedback != null) if (feedback != null)