Skip to content

Commit 322ef98

Browse files
committed
libsecret: fix warning with move to net6.0 TFM
Moving to target .NET 6 directly with the core library has unearthed a bug/warning in the secret service implementation. IntPtr is a value type, so it can never be null.. we should have been comparing this pointer to `IntPtr.Zero`.
1 parent 7366a54 commit 322ef98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shared/Core/Interop/Linux/SecretServiceCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public unsafe ICredential Get(string service, string account)
6565
throw new InteropException("Failed to search for credentials", code, new Exception(message));
6666
}
6767

68-
if (results != null && results->data != null)
68+
if (results != null && results->data != IntPtr.Zero)
6969
{
7070
SecretItem* item = (SecretItem*) results->data;
7171

0 commit comments

Comments
 (0)