mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-19 00:06:42 +08:00
[unity] Handle null pool in SkeletonGhost.OnDestroy() (#979)
This commit is contained in:
parent
92c557e6ba
commit
ad1279a71f
@ -155,8 +155,10 @@ namespace Spine.Unity.Modules {
|
||||
}
|
||||
|
||||
void OnDestroy () {
|
||||
for (int i = 0; i < maximumGhosts; i++)
|
||||
if (pool[i] != null) pool[i].Cleanup();
|
||||
if (pool != null) {
|
||||
for (int i = 0; i < maximumGhosts; i++)
|
||||
if (pool[i] != null) pool[i].Cleanup();
|
||||
}
|
||||
|
||||
foreach (var mat in materialTable.Values)
|
||||
Destroy(mat);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user