Baystation12/Baystation12 — pull request #2390 by Uristqwerty (2013-02-20 19:51:24+00:00)
Title: Fixed infinite loop in powernet rebuild. (Issue #2385)

If a /obj/machinery/power wasn't anchored, it wouldn't get a new list of connections, so would endlessly loop on the old list, of which that object was the first entry, ensuring that the loop would never terminate.

This fix simply returns from the proc if there is no new list, and should also handle the case where, through a bug or half-added change, either get_connections() may return a list containing other object types, though for that case it would be preferable to check for unexpected object types and log the occurrence, to assist in debugging.