From 4439ce6f2dabd976651b5a65f1f233cdc9df6ec8 Mon Sep 17 00:00:00 2001 From: Morten Nielsen Date: Tue, 19 Nov 2024 21:16:41 -0800 Subject: [PATCH] Fix null annotation --- src/NmeaParser/NmeaDevice.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NmeaParser/NmeaDevice.cs b/src/NmeaParser/NmeaDevice.cs index 7a988b7..3794903 100644 --- a/src/NmeaParser/NmeaDevice.cs +++ b/src/NmeaParser/NmeaDevice.cs @@ -112,7 +112,7 @@ namespace NmeaParser await this.CloseAsync().ConfigureAwait(false); } catch { } - DeviceDisconnected.Invoke(this, ex); + DeviceDisconnected?.Invoke(this, ex); } /// @@ -247,7 +247,7 @@ namespace NmeaParser /// /// Raised when a device raises the same error multiple times and can't recover. /// - public event EventHandler DeviceDisconnected; + public event EventHandler? DeviceDisconnected; /// /// Releases unmanaged and - optionally - managed resources.