From f2a3434407f9f13ce267d150c7d1335628f799c9 Mon Sep 17 00:00:00 2001 From: orbiter Date: Sun, 9 Sep 2007 17:31:29 +0000 Subject: [PATCH] fix for http://forum.yacy-websuche.de/viewtopic.php?f=6&t=238&p=1341#p1341 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4082 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaCrawlBalancer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/de/anomic/plasma/plasmaCrawlBalancer.java b/source/de/anomic/plasma/plasmaCrawlBalancer.java index fe2ed57e8..1905e2351 100644 --- a/source/de/anomic/plasma/plasmaCrawlBalancer.java +++ b/source/de/anomic/plasma/plasmaCrawlBalancer.java @@ -459,11 +459,12 @@ public class plasmaCrawlBalancer { public synchronized plasmaCrawlEntry top(int dist) throws IOException { // if we need to flush anything, then flush the domain stack first, // to avoid that new urls get hidden by old entries from the file stack + if (urlRAMStack == null) return null; while ((domainStacksNotEmpty()) && (urlRAMStack.size() <= dist)) { // flush only that much as we need to display flushOnceDomStacks(0, true); } - while ((urlRAMStack.size() <= dist) && (urlFileStack.size() > 0)) { + while ((urlFileStack != null) && (urlRAMStack.size() <= dist) && (urlFileStack.size() > 0)) { // flush some entries from disc to ram stack try { kelondroRow.Entry t = urlFileStack.pop();