Ahh yes! That does sound more logical, and fits the symptoms pretty well.
'shieldEffectEnt' is being called with a dead, but still warm, MY pointer.
So the my pointer is 'dead' but still contains a pointer to the 'corpse'.
So when the loop eventually falls through to the ent_remove, then it crashes.
And because 'shieldEffectEnt' was not yet running when that MY was originally
removed, then that original ent_remove couldnt possibly kill this function.
Clever...
But ... how do we protect against it happening?
I cant see any way to do it from in here... we need some protection in the calling function methinks...