mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fix for NullReferenceException: Object reference not set to an instance of an object
This commit is contained in:
parent
75a1003b8c
commit
41e493b7c3
@ -194,7 +194,13 @@ namespace Spine.Unity {
|
|||||||
loadedDataAtMaterial = new MaterialOnDemandData[placeholderMap.Length];
|
loadedDataAtMaterial = new MaterialOnDemandData[placeholderMap.Length];
|
||||||
for (int i = 0, count = loadedDataAtMaterial.Length; i < count; ++i) {
|
for (int i = 0, count = loadedDataAtMaterial.Length; i < count; ++i) {
|
||||||
loadedDataAtMaterial[i].lastFrameRequested = -1;
|
loadedDataAtMaterial[i].lastFrameRequested = -1;
|
||||||
int texturesAtMaterial = placeholderMap[i].textures.Length;
|
|
||||||
|
var textures = placeholderMap[i].textures;
|
||||||
|
if (textures == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
int texturesAtMaterial = textures.Length;
|
||||||
loadedDataAtMaterial[i].textureRequests = new TextureRequest[texturesAtMaterial];
|
loadedDataAtMaterial[i].textureRequests = new TextureRequest[texturesAtMaterial];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user