It can happen if you're trying to wear an item you don't actually have in your inventory.