pioneerspacesim/pioneer — pull request #729 by robn (2011-10-26 08:58:42+00:00)
Title: Fix invalid access to SystemBody parent

Previously access the `SystemBody` parent relied on the underlying `StarSystem` object existing. For accesses in the same frame (eg in the same method) this is fine. If you were to store a `SystemBody` between game frames then there's a good chance that the underlying `StarSystem` would be purged from the cache, resulting in an invalid memory access.

This changes matters so that a request for the parent causes the `StarSystem` to be fetched first (hopefully from the cache) and the parent obtained from there.

Since previously a lone `SBody` did not know where it came from, I've upgraded its `id` field to of a full `SystemPath`.