From b7e3f617f04ace0a7ca87885b47f3b031ba151bd Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Tue, 19 Aug 2008 02:41:30 +0000 Subject: [PATCH] Fixed NPE found by Sigalig Whirligig. I find this super annoying about flash: for (propName in objRef) { // this works fine if objRef is null if (propName in objRef) { // this NPEs if objRef is null git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@634 ed5b42cb-e716-0410-a449-f6a68f950b19 --- src/as/com/threerings/flash/TextFieldUtil.as | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/as/com/threerings/flash/TextFieldUtil.as b/src/as/com/threerings/flash/TextFieldUtil.as index f12fa8ec..a6ba966e 100644 --- a/src/as/com/threerings/flash/TextFieldUtil.as +++ b/src/as/com/threerings/flash/TextFieldUtil.as @@ -102,7 +102,7 @@ public class TextFieldUtil { var tf :TextField = (clazz == null) ? new TextField() : TextField(new clazz()); - if ("outlineColor" in initProps) { + if ((initProps != null) && ("outlineColor" in initProps)) { tf.filters = [ new GlowFilter(uint(initProps["outlineColor"]), 1, 2, 2, 255) ]; }