Ah right... I think the Destroy() function needs to be changed then? It should always be safe to call the Destroy() function.
Another *fix* would be grabbing the next iterator before using the previous. That way, if the previous iterator was to be removed, you still have a valid next iterator. This fix feels like a hack though, and if for some reason the next iterator was to be removed, it would fail.
Another *fix* would be grabbing the next iterator before using the previous. That way, if the previous iterator was to be removed, you still have a valid next iterator. This fix feels like a hack though, and if for some reason the next iterator was to be removed, it would fail.