Fixed segmentation fault on villager damage

It occurred when attack was environmental.