]> git.pond.sub.org Git - empserver/commit
Fix cargo list shutdown oops
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 14 Sep 2008 13:37:26 +0000 (09:37 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 14 Sep 2008 14:21:26 +0000 (10:21 -0400)
commitc34daec8c6d4e7cb642e60897a9f309100b2fdc4
treedb520b2f4456691c8cbc9a91742acc738cef3f63
parent1876932cd9ba7c87d95e1f7824303a46349518b1
Fix cargo list shutdown oops

EF_PLANE is closed before EF_LAND: if a land unit carries a plane, the
plane goes away before its carrier, and unit_onresize() oopses.  Fix
by not checking cargo list consistency there when the file is already
gone.

unit_cargo_init() has a similar issue, at least theoretically: it
rebuilds cargo lists one after the other.  Zap them all first.
src/lib/common/cargo.c