Fix error when unsetting a hotkey.
Fixes rP24856.
Reported by: nwtour
Based on a patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3579