From 200042c87e6f35205010547f2e4ee5e6a72d5618 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 23 Feb 2007 23:29:43 +0000 Subject: [PATCH] Return null if get() is called before we have our game data, rather than NPE. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@207 c613c5cb-e716-0410-b11b-feb51c14d237 --- src/as/com/threerings/ezgame/EZGameControl.as | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/as/com/threerings/ezgame/EZGameControl.as b/src/as/com/threerings/ezgame/EZGameControl.as index cc78b372..f225c142 100644 --- a/src/as/com/threerings/ezgame/EZGameControl.as +++ b/src/as/com/threerings/ezgame/EZGameControl.as @@ -165,6 +165,10 @@ public class EZGameControl extends BaseControl */ public function get (propName :String, index :int = -1) :Object { + if (_gameData == null) { + return null; + } + var value :Object = _gameData[propName]; if (index >= 0) { if (value is Array) {