2002/07/02 00:18:00
[org.ibex.core.git] / src / org / xwt / XWT.java
index 57a55fa..340033f 100644 (file)
@@ -281,7 +281,7 @@ public final class XWT extends JSObject {
     
     private static final JSFunction parseHTML = new JSFunction() {
             public Object call(Context cx, Scriptable thisObj, Scriptable ctorObj, Object[] args) throws JavaScriptException {
-                if (args == null || args.length != 1) return null;
+                if (args == null || args.length != 1 || args[0] == null) return null;
                 try {
                     if (args[0] instanceof ByteStream) {
                         return HTML.parseReader(new InputStreamReader(((ByteStream)args[0]).getInputStream()));