2002/06/23 21:34:06
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:48:23 +0000 (06:48 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:48:23 +0000 (06:48 +0000)
darcs-hash:20040130064823-2ba56-704002e0f8d163820429d910e3164661156a70d0.gz

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()));