Another NPE fix for bug #689

http://dev.helma.org/bugs/show_bug.cgi?id=689
This commit is contained in:
hns 2009-11-05 08:11:53 +00:00
parent 9b7af555df
commit 989ce36da0

View file

@ -507,7 +507,7 @@ public class HopObject extends ScriptableObject implements Wrapper, PropertyReco
Node node = (Node) getNode();
prefetchChildren(start, length);
SubnodeList list = node.getSubnodeList();
length = Math.min(list.size() - start, length);
length = list == null ? 0 : Math.min(list.size() - start, length);
if (length <= 0) {
return Context.getCurrentContext().newArray(core.global, 0);
}