2003/06/07 09:09:44
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:00:49 +0000 (07:00 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:00:49 +0000 (07:00 +0000)
darcs-hash:20040130070049-2ba56-b849955126c10dd5c36b09fbc042b1f53aabd27d.gz

src/org/xwt/js/ForthBlock.java

index b923f8f..0cc4ed2 100644 (file)
@@ -101,7 +101,9 @@ class ForthBlock implements OpCodes, Tokens {
            case PUT: {
                Object val = t.pop();
                Object key = t.pop();
-               ((JS)t.peek()).put(key, val);
+               JS target = (JS)t.peek();
+               if (target == null) throw new JS.Exn("tried to put a value to the " + key + " property on the null value");
+               target.put(key, val);
                t.push(val);
                break;
            }