handle having no trust anchors more gracefully.
[captive-validator.git] / src / com / verisign / tat / dnssec / TrustAnchorStore.java
index 9e30fb9..bd35e78 100644 (file)
@@ -86,6 +86,10 @@ public class TrustAnchorStore {
     public List<String> listTrustAnchors() {
         List<String> res = new ArrayList<String>();
 
+        if (mMap == null) {
+            return res;
+        }
+
         for (Map.Entry<String, SRRset> entry : mMap.entrySet()) {
             for (Iterator<Record> i = entry.getValue().rrs(); i.hasNext();) {
                 DNSKEYRecord r = (DNSKEYRecord) i.next();