… | |
… | |
293 | int |
293 | int |
294 | follow_owner (object *ob, object *owner) |
294 | follow_owner (object *ob, object *owner) |
295 | { |
295 | { |
296 | if (owner->flag [FLAG_REMOVED]) |
296 | if (owner->flag [FLAG_REMOVED]) |
297 | return 0; // do nothing if the owner is removed |
297 | return 0; // do nothing if the owner is removed |
298 | else if (owner->map->in_memory != MAP_IN_MEMORY) |
298 | else if (owner->map && owner->map->in_memory != MAP_IN_MEMORY) |
299 | LOG (llevError, "Owner of the pet not on a map in memory!?\n"); |
299 | LOG (llevError, "Owner of the pet not on a map in memory!?\n"); |
300 | else |
300 | else |
301 | { |
301 | { |
302 | int dir = find_free_spot (ob, owner->map, owner->x, owner->y, 1, SIZEOFFREE); |
302 | int dir = find_free_spot (ob, owner->map, owner->x, owner->y, 1, SIZEOFFREE); |
303 | |
303 | |