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
This commit is contained in:
@@ -165,6 +165,10 @@ public class EZGameControl extends BaseControl
|
|||||||
*/
|
*/
|
||||||
public function get (propName :String, index :int = -1) :Object
|
public function get (propName :String, index :int = -1) :Object
|
||||||
{
|
{
|
||||||
|
if (_gameData == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
var value :Object = _gameData[propName];
|
var value :Object = _gameData[propName];
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
if (value is Array) {
|
if (value is Array) {
|
||||||
|
|||||||
Reference in New Issue
Block a user