I want to guess too, I want to guess too! shocked

Okay, so I doubt that the if crashes like EvilSOB guessed, just checking if a pointer evaluates to true can't crash unless you managed to free some memory that you shouldn't have access to in the first place.

But, here is my guess; The feature you want to use requires the help of the scheduler, the scheduler only kicks in if you enter it with a wait() call but you function might not even call it once, for example if you is NULL and timePassed is greater or equal to 8. I don't know how you call this function, but is it possible that you manage to ent_remove() my before you enter it? If yes, you could set my explicitly to NULL after your ent_remove(my) to make sure that you don't work with the dead entity.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com