summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs b/samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs
index f521c0e..1572c05 100644
--- a/samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs
+++ b/samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs
@@ -84,7 +84,7 @@ namespace OpenIdRelyingPartyWebForms.Code {
public CryptoKey GetKey(string bucket, string handle) {
var assocRow = dataSet.CryptoKey.FindByBucketHandle(bucket, handle);
- return new CryptoKey(assocRow.Secret, assocRow.ExpiresUtc);
+ return assocRow == null ? null : new CryptoKey(assocRow.Secret, assocRow.ExpiresUtc);
}
public IEnumerable<KeyValuePair<string, CryptoKey>> GetKeys(string bucket) {