Execute code on player crash

I wish to execute some code (spill inventory) when a player crashes from a server.
I tried doing it in the OnLogout() function of the game mode but this only worked for normal disconnections and not crashes.

What function do I need to handle crashing from the server?