NullReferenceException OnEntityTakeDamageFixed

Occasionally seeing this error in the server console:

(20:23:20) | Failed to call hook 'OnEntityTakeDamage' on plugin 'GlobalStorage v1.0.2' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.GlobalStorage.OnEntityTakeDamage (StorageContainer entity, HitInfo info) [0x0000e] in <5d0a70634ea4444588091ec981629f2f>:0

at Oxide.Plugins.GlobalStorage.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00261] in <5d0a70634ea4444588091ec981629f2f>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <dfcb48ea05694263bbc08e62a39c274c>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <dfcb48ea05694263bbc08e62a39c274c>:0


I do have the boxes set to be invulnerable.

Added a potential fix for the issue.

Awesome, thanks!

I saw this again in the server logs.  Not sure what's going on when it happens.  I have to head to a safe zone today to test another plugin bugfix so I'll see if I can reproduce this.

Merged post

Ok, so I can't reproduce by attacking the box.  I also get killed by the sentries if I do so.  However, looking back over the logs the time the error was thrown it was at a time when it appears there was a dangerous treasures event near the area and possibly NPC fire hit the box.  I have tested shooting the box from a log distance as well (so I don't get sentry killed) and cannot trigger the error.

Locked automatically