From 30cd47af5a8494d8c3b7906fce13d4cbb4d33c0a Mon Sep 17 00:00:00 2001 From: jove Date: Sat, 30 Sep 2023 05:59:30 +0100 Subject: [PATCH] Fix destroyed things being processed --- src/map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map.cpp b/src/map.cpp index 2019c1d36e64..cc3d14f86bd6 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -4742,7 +4742,7 @@ void map::process_items_in_submap( submap ¤t_submap, const tripoint &gridp std::vector 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; }