Merge pull request #2383 from BlueBlock/fix_null_check_not_needed

Update PuttySessionsRegistryProvider.cs
This commit is contained in:
Dimitrij
2023-03-16 20:10:57 +00:00
committed by GitHub

View File

@@ -24,10 +24,8 @@ namespace mRemoteNG.Config.Putty
public override string[] GetSessionNames(bool raw = false)
{
if (PuttySessionsKey == null) return null;
var sessionsKey = Registry.CurrentUser.OpenSubKey(PuttySessionsKey);
if (sessionsKey == null) return new string[] { };
if (sessionsKey == null) return Array.Empty<string>();
var sessionNames = new List<string>();
foreach (var sessionName in sessionsKey.GetSubKeyNames())