--- deliantra/server/ext/map-scheduler.ext 2007/01/03 03:04:12 1.8 +++ deliantra/server/ext/map-scheduler.ext 2007/01/03 12:33:33 1.9 @@ -13,11 +13,16 @@ while () { Coro::Timer::sleep $SCHEDULE_INTERVAL; + # this weird form of iteration over values is used because + # the hash changes underneath us frequently, and for + # keeps a direct reference to the value without (in 5.8 perls) + # keeping a reference, so this is prone to crashes or worse. my @maps = keys %cf::MAP; for (@maps) { my $map = $cf::MAP{$_} or next; $map->valid or next; + eval { # not yet, because maps might become visible to players nearby # we need to remove the map from %cf::MAP and all tiled map links