Add null checks in DefaultCredProviderManager. Fixes #102.

This commit is contained in:
David Wolff
2012-03-19 15:17:13 -07:00
parent 7ab45a4159
commit e37a44b047

View File

@@ -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