mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 11:04:21 +01:00
Fixed problem when registry key does not exist
This commit is contained in:
parent
46dc83f61c
commit
04140081ce
@ -87,7 +87,16 @@ namespace DS4Windows
|
||||
public void ScanPurgeHidGuard()
|
||||
{
|
||||
RegistryKey tempkey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Services\HidGuardian\Parameters\Whitelist");
|
||||
string[] subkeys = tempkey.GetSubKeyNames();
|
||||
string[] subkeys = null;
|
||||
if (tempkey != null)
|
||||
{
|
||||
subkeys = tempkey.GetSubKeyNames();
|
||||
}
|
||||
else
|
||||
{
|
||||
subkeys = new string[0];
|
||||
}
|
||||
|
||||
bool processExists = false;
|
||||
for (int ind = 0, arlen = subkeys.Length; ind < arlen; ind++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user