129: if corpse and corpse.valid and
130: (corpse_data.entity and corpse_data.entity.valid and corpse.name == corpse_data.name) or
131: (corpse.name == minime.generic_corpse_name and corpse_data.use_generic) then
132: minime.writeDebug("Both corpses are valid!")
I already took care that the corpse is valid before trying to index it, and I get "Both corpses are valid!" in my log file. That's what's so astonishing. :-)
(Also, "corpse_data.name" is not a typo, I've stored the name separately so I will still be able to read it when the entity has expired.)