Michael @drjeats@octodon.social
Follow

Ah yes, I remember writing this comment and sighing heavily.

```
/*
There's a possible destruction order bug where this script is destroyed, but the ItemDropSystem script that starts this coroutine has not yet been destroyed, and the delay time elapses resulting in a null reference exception when accessing this script's Unity API. So if (this == null) then exit the coroutine.
*/

if (this == null) { yield break; }
```

· Web · 1 · 1