Skip to content

Commit

Permalink
Fix trade crash in certain situations (#52042)
Browse files Browse the repository at this point in the history
  • Loading branch information
dseguin authored Oct 3, 2021
1 parent ad778bb commit 1b8564a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/npctrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ std::list<item> npc_trading::transfer_items( std::vector<item_pricing> &stuff, C
}
sorted_stuff.insert( sorted_stuff.begin(), unsorted_stuff.begin(), unsorted_stuff.end() );

for( item_pricing ip : sorted_stuff ) {
for( item_pricing &ip : sorted_stuff ) {

if( ip.loc.get_item() == nullptr ) {
DebugLog( D_ERROR, D_NPC ) << "Null item being traded in npc_trading::transfer_items";
Expand Down

0 comments on commit 1b8564a

Please sign in to comment.