From 0662326da80880903a54fb40de68c6c0c6245357 Mon Sep 17 00:00:00 2001 From: mullerj Date: Wed, 5 Jun 2024 22:40:09 -0400 Subject: [PATCH] Updated GetSession to TryGetValue --- src/dotnet/src/Mil.Navy.Nrl.Norm/NormSession.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dotnet/src/Mil.Navy.Nrl.Norm/NormSession.cs b/src/dotnet/src/Mil.Navy.Nrl.Norm/NormSession.cs index 6f24080..f4b9177 100644 --- a/src/dotnet/src/Mil.Navy.Nrl.Norm/NormSession.cs +++ b/src/dotnet/src/Mil.Navy.Nrl.Norm/NormSession.cs @@ -74,11 +74,11 @@ namespace Mil.Navy.Nrl.Norm /// /// Specifies the session to return. /// Returns a NormSession. - internal static NormSession GetSession(long handle) + internal static NormSession? GetSession(long handle) { lock (_normSessions) { - return _normSessions[handle]; + return _normSessions.TryGetValue(handle, out NormSession? session) ? session : null; } }