fixed bug 536
[org.ibex.core.git] / src / org / ibex / Box.java
index 6811f21..c153c8b 100644 (file)
@@ -571,7 +571,7 @@ public final class Box extends JSScope implements Scheduler.Task {
     public void put(Object name, Object value) throws JSExn {
         if (name instanceof Number) { put(toInt(name), value); return; }
         //#switch(name)
-        case "text": CHECKSET_STRING(text); RECONSTRAIN(); DIRTY;
+        case "text": if (value == null) value = ""; CHECKSET_STRING(text); RECONSTRAIN(); DIRTY;
         case "strokecolor": value = N(stringToColor((String)value)); CHECKSET_INT(strokecolor); DIRTY;
         case "textcolor": value = N(stringToColor((String)value)); CHECKSET_INT(strokecolor); DIRTY;
         case "strokewidth": CHECKSET_SHORT(strokewidth); DIRTY;