mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-10 17:18:44 +08:00
Fix for IndexOutOfRangeException: Index was outside the bounds of the array
This commit is contained in:
parent
a8f400b9bf
commit
75a1003b8c
@ -264,6 +264,10 @@ namespace Spine.Unity {
|
||||
System.Action<Texture> onTextureLoaded) {
|
||||
|
||||
PlaceholderTextureMapping[] placeholderTextures = placeholderMap[materialIndex].textures;
|
||||
if (placeholderTextures == null || textureIndex >= placeholderTextures.Length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
TargetReference targetReference = placeholderTextures[textureIndex].targetTextureReference;
|
||||
loadedDataAtMaterial[materialIndex].lastFrameRequested = Time.frameCount;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user