Skip to content

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

another patch to prevent NPE in EcoTable

orbiter45ae3da7e7dc
diff --git a/source/de/anomic/kelondro/kelondroEcoTable.java b/source/de/anomic/kelondro/kelondroEcoTable.java
index 972eed500..7a13bac08 100644
--- a/source/de/anomic/kelondro/kelondroEcoTable.java
+++ b/source/de/anomic/kelondro/kelondroEcoTable.java
@@ -338,6 +338,7 @@ public class kelondroEcoTable implements kelondroIndex {
// construct the row using the copy in RAM
kelondroRow.Entry v = table.get(i);
assert v != null;
+ if (v == null) return null;
assert key.length == rowdef.primaryKeyLength;
System.arraycopy(key, 0, b, 0, key.length);
System.arraycopy(v.bytes(), 0, b, rowdef.primaryKeyLength, rowdef.objectsize - rowdef.primaryKeyLength);