It crashes at the event notifying that an entity was damaged.
Because of used 'filters' it should only fire when an entity of type 'character' is damaged.
So it fires, and checks whether the player this character (assumingly) belongs to... has a character. That's probably a bit redundant... but maybe I had a reason to put it there, so I'll leave it.
Anyway, In the case of the crashing event, there is no player object there in the first place.
I managed to recreate this crash by leaving the body into god mode (/c game.player.character=nil
) and letting enemies attack it.
I guess either you did something similar, or some mod created a 'character' entity, not controlled by a player, that was damaged.
I added a check for it in 1.0.4.
And I realized that I had a bug that would crash the mod if you attempted to limit your health, lol. Fixed that too.