From 4f7ad4ccb9eacae75d692d26329ba54129a943ef Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Mon, 8 Feb 2021 15:43:04 -0700 Subject: [PATCH] fixes #599 by checking for registration status before updating feedbacks --- .../Crestron/CrestronGenericBaseDevice.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron/CrestronGenericBaseDevice.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron/CrestronGenericBaseDevice.cs index 56b36791..df2c3c56 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron/CrestronGenericBaseDevice.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron/CrestronGenericBaseDevice.cs @@ -130,6 +130,12 @@ namespace PepperDash.Essentials.Core void Hardware_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { 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) { if (feedback != null)