[TK2D] Fixed null array reference in some cases.

from this PR: https://github.com/EsotericSoftware/spine-runtimes/pull/400
The other half of this PR was already applied in a previous commit.

Thanks @YiDuwon
This commit is contained in:
John 2016-01-02 06:36:02 +08:00
parent c92e0f95d8
commit 83a7ecc3b0

View File

@ -50,6 +50,11 @@ public class SkeletonDataAsset : ScriptableObject {
private SkeletonData skeletonData;
private AnimationStateData stateData;
void OnEnable () {
if (atlasAssets == null)
atlasAssets = new AtlasAsset[0];
}
public void Reset () {
skeletonData = null;
stateData = null;