NPE fix when closing player inventory without touching any items