mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
fixes #599 by checking for registration status before updating feedbacks
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user