From 04571f51b2401f47735894d8c869b002c28e204c Mon Sep 17 00:00:00 2001 From: Notselwyn <68616630+Notselwyn@users.noreply.github.com> Date: Fri, 29 Dec 2023 19:35:32 +0100 Subject: [PATCH] fix: fixed obj != obj checking (according to devops warnings) --- SafeExamBrowser.SystemComponents/Registry/Registry.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SafeExamBrowser.SystemComponents/Registry/Registry.cs b/SafeExamBrowser.SystemComponents/Registry/Registry.cs index c97cd2bc..e0e1eec5 100644 --- a/SafeExamBrowser.SystemComponents/Registry/Registry.cs +++ b/SafeExamBrowser.SystemComponents/Registry/Registry.cs @@ -86,7 +86,7 @@ namespace SafeExamBrowser.SystemComponents.Registry logger.Error($"Failed to read value '{name}' from registry key '{key}'!", e); } - return value != default && value != defaultValue; + return value != default && !ReferenceEquals(value, defaultValue); } public bool TryGetNames(string keyName, out IEnumerable names)