Don't crash if inventory has no slots when displaying the Inventory
dialog.