CleverRaven/Cataclysm-DDA — pull request #2527 by atomicdryad (2013-08-19 15:34:53+00:00)
Title: Prevent item controller generated corpses from becoming game crashing bombs: add itype.corpse, default to mon_null (human). Replace typeId string cmp with pointer NULL check prior to using pointer

This is evident in spider caves, which can lead to inevitable crash via:
mapgen(ot_spider_pit_under) -> place_items("spider") -> item_groups.json("corpse") -> spawn_item -> item_controller->create -> itype("corpse"),
which does not fill in "corpse" variable'. Eventually when this bogus corpse is parsed via map::drawsq -> item.color, segfault.

This is also due to functions in item.cpp checking 'typeId() == "corpse"', instead of 'corpse != NULL'