From 4ec134c41fc8e8b6bf870e4ab1e859c4eb22b3d6 Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 27 Jan 2004 14:22:14 +0000 Subject: [PATCH] Check for null child objects in HopObject.list() --- src/helma/scripting/rhino/HopObject.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/helma/scripting/rhino/HopObject.java b/src/helma/scripting/rhino/HopObject.java index b8fef9e9..28bf0ff5 100644 --- a/src/helma/scripting/rhino/HopObject.java +++ b/src/helma/scripting/rhino/HopObject.java @@ -475,7 +475,9 @@ public class HopObject extends ScriptableObject implements Wrapper { ArrayList a = new ArrayList(); while ((e != null) && e.hasMoreElements()) { - a.add(Context.toObject(e.nextElement(), core.global)); + Object obj = e.nextElement(); + if (obj != null) + a.add(Context.toObject(obj, core.global)); } return Context.getCurrentContext().newArray(core.global, a.toArray());