Browse Source

Null check in SpriteFader

master
Chris Gregan 9 years ago
parent
commit
b09a34b7fc
  1. 1
      Assets/Fungus/Sprite/Scripts/SpriteFader.cs

1
Assets/Fungus/Sprite/Scripts/SpriteFader.cs

@ -47,6 +47,7 @@ namespace Fungus
// Destroy any existing fader component
SpriteFader oldSpriteFader = spriteRenderer.GetComponent<SpriteFader>();
if (oldSpriteFader != null)
{
Destroy(oldSpriteFader);
}

Loading…
Cancel
Save