Fix null annotation

This commit is contained in:
Morten Nielsen 2024-11-19 21:16:41 -08:00
parent 7f19a2531e
commit 4439ce6f2d

View file

@ -112,7 +112,7 @@ namespace NmeaParser
await this.CloseAsync().ConfigureAwait(false);
}
catch { }
DeviceDisconnected.Invoke(this, ex);
DeviceDisconnected?.Invoke(this, ex);
}
/// <summary>
@ -247,7 +247,7 @@ namespace NmeaParser
/// <summary>
/// Raised when a device raises the same error multiple times and can't recover.
/// </summary>
public event EventHandler<Exception> DeviceDisconnected;
public event EventHandler<Exception>? DeviceDisconnected;
/// <summary>
/// Releases unmanaged and - optionally - managed resources.