From 47ab4283713ea8fc26eb06c11c75051743bb3a39 Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 4 Jul 2002 18:44:51 +0000 Subject: [PATCH] Check if prototype exists in hasFunction(...). --- src/helma/scripting/fesi/FesiEvaluator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/helma/scripting/fesi/FesiEvaluator.java b/src/helma/scripting/fesi/FesiEvaluator.java index b1572ceb..187f6cfc 100644 --- a/src/helma/scripting/fesi/FesiEvaluator.java +++ b/src/helma/scripting/fesi/FesiEvaluator.java @@ -395,6 +395,9 @@ public final class FesiEvaluator implements ScriptingEngine { String protoname = app.getPrototypeName (obj); try { ObjectPrototype op = getPrototype (protoname); + // if this is an untyped object return false + if (op == null) + return false; ESValue func = op.getProperty (fname, fname.hashCode()); if (func != null && func instanceof FunctionPrototype) return true;