[unity] Fixed a potential null reference exception reported by a user.

This commit is contained in:
Harald Csaszar 2020-03-30 17:45:27 +02:00
parent dd1b3aaa50
commit 7c2e2cb7ef

View File

@ -182,7 +182,7 @@ namespace Spine.Unity {
/// <summary>Progresses the AnimationState according to the given deltaTime, and applies it to the Skeleton. Use Time.deltaTime to update manually. Use deltaTime 0 to update without progressing the time.</summary>
public void Update (float deltaTime) {
if (!valid)
if (!valid || state == null)
return;
deltaTime *= timeScale;