--- deliantra/server/common/object.C 2006/12/26 20:04:09 1.93 +++ deliantra/server/common/object.C 2006/12/27 05:42:08 1.95 @@ -787,6 +787,14 @@ void object::destroy_inv (bool drop_to_ground) { + // need to check first, because the checks below might segfault + // as we might be on an invalid mapspace and crossfire code + // is too buggy to ensure that the inventory is empty. + // corollary: if you create arrows etc. with stuff in tis inventory, + // cf will crash below with off-map x and y + if (!inv) + return; + /* Only if the space blocks everything do we not process - * if some form of movement is allowed, let objects * drop on that space. @@ -794,7 +802,7 @@ if (!drop_to_ground || !map || map->in_memory != MAP_IN_MEMORY - || map->at (x, y).move_block == MOVE_ALL) + || ms ().move_block == MOVE_ALL) { while (inv) {