Fixes a crash caused by a cop's weapon getting destroyed when dominated during their tase animation while their weapon is firing.
Version 2: Implemented a fix that should prevent the crash from happening to clients when playing as host, even on unmodded players.
Application has crashed: access violation (...) Current thread: Main Script stack: update() lib/units/enemies/cop/actions/full_body/copactionhurt.lua:1386 _upd_actions() lib/units/enemies/cop/copmovement.lua:848 _upd_actions() lib/units/enemies/cop/huskcopmovement.lua:13 lib/units/enemies/cop/copmovement.lua:773
CopActionHurt:_upd_hurt() doesn't check if the unit is valid before trying to reference it, so when the weapon gets destroyed, the function will fruitlessly keep trying to manipulate the weapon.
The weapon is probably getting destroyed by lib/units/enemies/cop/huskcopbrain - HuskCopBrain:sync_net_event() which added new instances of destroy_all_items() which weren't present prior to U240.3.