Explorar o código

null check

atlas may become null
Shinsuke Sugita %!s(int64=8) %!d(string=hai) anos
pai
achega
5ad6934fd1

+ 1 - 0
spine-unity/Assets/Examples/Scripts/Sample Components/Legacy/AtlasRegionAttacher.cs

@@ -62,6 +62,7 @@ namespace Spine.Unity.Modules {
 			if (!this.enabled) return;
 			if (!this.enabled) return;
 
 
 			atlas = atlasAsset.GetAtlas();
 			atlas = atlasAsset.GetAtlas();
+			if (atlas == null) return;
 			float scale = skeletonRenderer.skeletonDataAsset.scale;
 			float scale = skeletonRenderer.skeletonDataAsset.scale;
 
 
 			foreach (var entry in attachments) {
 			foreach (var entry in attachments) {