summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenId/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenId/Util.cs')
-rw-r--r--src/DotNetOpenId/Util.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/DotNetOpenId/Util.cs b/src/DotNetOpenId/Util.cs
index 82892b2..65bf3b0 100644
--- a/src/DotNetOpenId/Util.cs
+++ b/src/DotNetOpenId/Util.cs
@@ -88,7 +88,7 @@ namespace DotNetOpenId {
internal const string DefaultNamespace = "DotNetOpenId";
public static IDictionary<string, string> NameValueCollectionToDictionary(NameValueCollection nvc) {
- if (nvc == null) throw new ArgumentNullException("nvc");
+ if (nvc == null) return null;
var dict = new Dictionary<string, string>(nvc.Count);
for (int i = 0; i < nvc.Count; i++) {
string key = nvc.GetKey(i);
@@ -103,6 +103,7 @@ namespace DotNetOpenId {
return dict;
}
public static NameValueCollection DictionaryToNameValueCollection(IDictionary<string, string> dict) {
+ if (dict == null) return null;
NameValueCollection nvc = new NameValueCollection(dict.Count);
foreach (var pair in dict) {
nvc.Add(pair.Key, pair.Value);