Skip to content

Commit

Permalink
Fix destroyed things being processed
Browse files Browse the repository at this point in the history
  • Loading branch information
joveeater committed Sep 30, 2023
1 parent c25aa04 commit 30cd47a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4742,7 +4742,7 @@ void map::process_items_in_submap( submap &current_submap, const tripoint &gridp
std::vector<item *> active_items = current_submap.active_items.get_for_processing();
const point grid_offset( gridp.x * SEEX, gridp.y * SEEY );
for( item *&active_item_ref : active_items ) {
if( !active_item_ref ) {
if( !active_item_ref || !active_item_ref->is_loaded() ) {
// The item was destroyed, so skip it.
continue;
}
Expand Down

0 comments on commit 30cd47a

Please sign in to comment.