Thanks technomage, I tried your way (which makes a bit more sense to me) but I get the same error. It is very difficult to see which line of my code is causing it but it shows that the error is in DXSprite:

FEngine.FDeadList.Add(Self) in procedure TSprite.Dead;

So I suppose it must have something to do with the calls to dead?