Fixed a crash due to null-Inventory