PrimaryFeather/Starling-Framework — Issue #70: TextField createRenderContents
Author: Travisism
Created: 2012-03-01 22:26:31+00:00
State: open

Howdy,

In the latest Starling version, in the TextField method createRenderedConents():DisplayObject you have the following line:

```javascript
if (mText.length == 0) return new Sprite();
```

However, for some reason that I can't yet track down (I will update when I figure out how to reproduce), mText is sometimes null or undefined, so when .length is accessed, it throws an error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at starling.text::TextField/createRenderedContents()[C:\Users\Travis\Adobe Flash Builder 4.6\FTT Library\starling\text\TextField.as:152]

To hold me over until this is fixed, you can add this line above the mtext.length line:

```javascript
if (!mText) return new Sprite();
```