1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-09 23:15:41 +00:00

Suppress unlikely null value

This commit is contained in:
Oliver Booth 2022-11-30 19:01:37 +00:00
parent 6a16ef6097
commit cb232cd0d3
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634

View File

@ -77,7 +77,7 @@ internal sealed class Connection : IDisposable
public static nint CreateNative(nint vpConnection, nint context)
{
GCHandle contextHandle = GCHandle.FromIntPtr(context);
var connection = new Connection(vpConnection, contextHandle.Target);
var connection = new Connection(vpConnection, contextHandle.Target!);
GCHandle handle = GCHandle.Alloc(connection, GCHandleType.Normal);
var ptr = GCHandle.ToIntPtr(handle);
return ptr;