Fixed NPE.

This commit is contained in:
NathanSweet 2014-04-28 17:51:07 +02:00
parent c1c12677ba
commit 04c0fec844
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ namespace Spine {
public void UpdateUVs () {
float u = RegionU, v = RegionV, width = RegionU2 - RegionU, height = RegionV2 - RegionV;
float[] regionUVs = this.regionUVs;
if (this.uvs.Length != regionUVs.Length) this.uvs = new float[regionUVs.Length];
if (this.uvs == null || this.uvs.Length != regionUVs.Length) this.uvs = new float[regionUVs.Length];
float[] uvs = this.uvs;
if (RegionRotate) {
for (int i = 0, n = uvs.Length; i < n; i += 2) {

View File

@ -78,7 +78,7 @@ namespace Spine {
public void UpdateUVs () {
float u = RegionU, v = RegionV, width = RegionU2 - RegionU, height = RegionV2 - RegionV;
float[] regionUVs = this.regionUVs;
if (this.uvs.Length != regionUVs.Length) this.uvs = new float[regionUVs.Length];
if (this.uvs == null || this.uvs.Length != regionUVs.Length) this.uvs = new float[regionUVs.Length];
float[] uvs = this.uvs;
if (RegionRotate) {
for (int i = 0, n = uvs.Length; i < n; i += 2) {