I certainly didn't say it was fine to have dangling pointers; I said that it shouldn't be a problem to see "(null)" in garbage rooms. In other words, cosmetics don't really matter for implementation details. Obviously, the code should still be clean... I meant that if FotE works anything like some of the other FUSS bases, these "garbage rooms" exist to preserve integrity of iteration. There was a lengthy discussion about this on MB recently, so I won't really go into it. It would be worth investigating why these garbage rooms were created in the first place. It's obviously possible that somebody was just copying code without understanding it, and indeed there is no issue with iteration here.
Yeah, you're right about the dangers of invalidating the room's ship list. In fact, the destroy_ship function calls itself if there are other ships in one of its hangars. Currently this is not problematic as such, because the ships are iterated on the global ship list, and not the hangar's local list.
And you're also right that it would be wise to investigate thoroughly. But as for the original topic there should be little doubt that the ship needs to be removed from room 46's ship list.
For the record, destroy_ship() is called in the following functions, neither of which removes it from room 46 afterwards:
do_salvage() (moves ship explicitly to room 46)
As noted, do_salvage moves it to room 46, which is also done inside destroy_ship afterwards.
Furthermore, there are no other references to room 46 anywhere in the code. So obviously it's not used for anything.
Room 45 (the original limbo shipyard) is used once; in do_endsimulator() in case the simulator's ship->sim_vnum doesn't refer to an existing room. That's fine, of course. But it's using the magic number '45' rather than the ROOM_LIMBO_SHIPYARD macro. I suggest fixing this. Edit: ROOM_LIMBO_SHIPYARD is also used once, in fread_ship in case ship->shipyard is negative. It does not, however, check whether ship->shipyard contains the vnum of an existing room. Might want to fix this as well, and set it to ROOM_LIMBO_SHIPYARD if it's an invalid room.
My theory is that the garbage room is used simply because the coders at the time just followed the SWR way, without really thinking it over twice.