check for NULL
added NULL checks to the rest of the pit traps
added missing declaration
revert savegame.h