From c0878ebf4787976f735f18f12ccce3572dd478a0 Mon Sep 17 00:00:00 2001 From: Patrick Grote Date: Tue, 4 Jun 2024 13:34:10 +0200 Subject: [PATCH] Fix another NPE --- ArtNetSharp/Communication/AbstractInstance.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArtNetSharp/Communication/AbstractInstance.cs b/ArtNetSharp/Communication/AbstractInstance.cs index bee36af..097bcaa 100644 --- a/ArtNetSharp/Communication/AbstractInstance.cs +++ b/ArtNetSharp/Communication/AbstractInstance.cs @@ -1278,7 +1278,7 @@ private async Task triggerSendArtPoll() private async void TimerSendPoll_Elapsed(object sender, EventArgs e) { - if (!ArtNetInstance.Instances.Contains(this)) + if (!(ArtNetInstance?.Instances?.Contains(this) ?? false)) return; await triggerSendArtPoll();