Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix for http://forum.yacy-websuche.de/viewtopic.php?f=6&t=1103&hilit=&p=7362#p7362

orbiter88216c1f1f5a
diff --git a/source/de/anomic/plasma/plasmaCrawlZURL.java b/source/de/anomic/plasma/plasmaCrawlZURL.java
index 082bc3a47..b8b35d66f 100644
--- a/source/de/anomic/plasma/plasmaCrawlZURL.java
+++ b/source/de/anomic/plasma/plasmaCrawlZURL.java
@@ -116,7 +116,11 @@ public class plasmaCrawlZURL {
}
public Entry top(int pos) {
- String urlhash = (String) stack.get(pos);
+ String urlhash;
+ synchronized (stack) {
+ if (pos >= stack.size()) return null;
+ urlhash = (String) stack.get(pos);
+ }
if (urlhash == null) return null;
return getEntry(urlhash);
}