mirror of
https://github.com/token2/pgina.git
synced 2026-03-13 11:14:19 -07:00
Add null checks in DefaultCredProviderManager. Fixes #102.
This commit is contained in:
@@ -473,7 +473,8 @@ namespace pGina.CredentialProvider.Registration
|
||||
public override bool Enabled()
|
||||
{
|
||||
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(this.ProviderKey))
|
||||
{
|
||||
{
|
||||
if (key == null) return false;
|
||||
object value = key.GetValue("Disabled");
|
||||
if (value == null) return true;
|
||||
else
|
||||
@@ -494,7 +495,8 @@ namespace pGina.CredentialProvider.Registration
|
||||
public override bool Enabled6432()
|
||||
{
|
||||
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(this.ProviderKey6432))
|
||||
{
|
||||
{
|
||||
if (key == null) return false;
|
||||
object value = key.GetValue("Disabled");
|
||||
if (value == null) return true;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user