diff --git a/source/net/yacy/crawler/data/CrawlProfile.java b/source/net/yacy/crawler/data/CrawlProfile.java index 6002bd9ff..e0b705563 100644 --- a/source/net/yacy/crawler/data/CrawlProfile.java +++ b/source/net/yacy/crawler/data/CrawlProfile.java @@ -226,7 +226,13 @@ public class CrawlProfile extends ConcurrentHashMap implements M } public AtomicInteger getCount(final String domain) { - return this.doms.get(domain); + AtomicInteger dp = this.doms.get(domain); + if (dp == null) { + // new domain + dp = new AtomicInteger(0); + this.doms.put(domain, dp); + } + return dp; } /**