From fdd85f3c2be5f04deb2117607a853ff35dd2aaa1 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 5 Dec 2007 21:17:36 +0000 Subject: [PATCH] I'm not sure how a DisplayObjectContainer has a null child, but I'm seeing it. Cope. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@366 ed5b42cb-e716-0410-a449-f6a68f950b19 --- src/as/com/threerings/flash/DisplayUtil.as | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/as/com/threerings/flash/DisplayUtil.as b/src/as/com/threerings/flash/DisplayUtil.as index f16402a8..1909129e 100644 --- a/src/as/com/threerings/flash/DisplayUtil.as +++ b/src/as/com/threerings/flash/DisplayUtil.as @@ -217,6 +217,10 @@ public class DisplayUtil private static function findInHierarchy0 ( obj :DisplayObject, name :String, shallow :Boolean, maxDepth :int, curDepth :int = 0) :Array { + if (obj == null) { + return null; + } + var bestResult :Array; if (obj.name == name) { if (shallow) {