diff --git a/src/inventory_ui.cpp b/src/inventory_ui.cpp index 2823695e60b25..fc4cbb72bd9ce 100644 --- a/src/inventory_ui.cpp +++ b/src/inventory_ui.cpp @@ -2551,10 +2551,11 @@ void inventory_multiselector::toggle_entries( int &count, const toggle_mode mode selected = get_active_column().get_all_selected(); break; case toggle_mode::NON_FAVORITE_NON_WORN: { - const auto filter_to_nonfavorite_and_nonworn = []( const inventory_entry & entry ) { + const auto filter_to_nonfavorite_and_nonworn = [this]( const inventory_entry & entry ) { return entry.is_item() && !entry.any_item()->is_favorite && - !get_player_character().is_worn( *entry.any_item() ); + !get_player_character().is_worn( *entry.any_item() ) && + preset.get_denial( entry.any_item() ).empty(); }; selected = get_active_column().get_entries( filter_to_nonfavorite_and_nonworn );