Skip to content

Commit 572ce32

Browse files
committed
refactor: use conditional access
1 parent 7d3ae8e commit 572ce32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deadlock-dotnet-sdk/Domain/NativeMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ bool Discard(SafeFileHandleEx h)
165165
return !filter.HasFlag(HandlesFilter.IncludeNonFiles); // When requested, keep non-File object handle. Else, discard.
166166
}
167167
// Discard handle if Query and file's path are not null and file's path does not contain query */
168-
return (query is not null) && (h.FileFullPath is not null) && (!h.FileFullPath.Contains(query.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar)));
168+
return (query is not null) && (h.FileFullPath?.Contains(query.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar)) == false);
169169
}
170170
else
171171
{

0 commit comments

Comments
 (0)