Fixed a crash happening when a character had no weapon equipped.

The new status effect apply function was turning the weapon pointer
into a reference leading to a memory corruption when no weapon
was equipped.