mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fixed NPE.
This commit is contained in:
parent
c1c12677ba
commit
04c0fec844
@ -75,7 +75,7 @@ namespace Spine {
|
|||||||
public void UpdateUVs () {
|
public void UpdateUVs () {
|
||||||
float u = RegionU, v = RegionV, width = RegionU2 - RegionU, height = RegionV2 - RegionV;
|
float u = RegionU, v = RegionV, width = RegionU2 - RegionU, height = RegionV2 - RegionV;
|
||||||
float[] regionUVs = this.regionUVs;
|
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;
|
float[] uvs = this.uvs;
|
||||||
if (RegionRotate) {
|
if (RegionRotate) {
|
||||||
for (int i = 0, n = uvs.Length; i < n; i += 2) {
|
for (int i = 0, n = uvs.Length; i < n; i += 2) {
|
||||||
|
|||||||
@ -78,7 +78,7 @@ namespace Spine {
|
|||||||
public void UpdateUVs () {
|
public void UpdateUVs () {
|
||||||
float u = RegionU, v = RegionV, width = RegionU2 - RegionU, height = RegionV2 - RegionV;
|
float u = RegionU, v = RegionV, width = RegionU2 - RegionU, height = RegionV2 - RegionV;
|
||||||
float[] regionUVs = this.regionUVs;
|
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;
|
float[] uvs = this.uvs;
|
||||||
if (RegionRotate) {
|
if (RegionRotate) {
|
||||||
for (int i = 0, n = uvs.Length; i < n; i += 2) {
|
for (int i = 0, n = uvs.Length; i < n; i += 2) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user