Fix crash when categories have empty icons or names.