diff --git a/openmc/geometry.py b/openmc/geometry.py index 3becde9a7a..e7d981d7b8 100644 --- a/openmc/geometry.py +++ b/openmc/geometry.py @@ -568,7 +568,8 @@ class Geometry: # Iterate through all cells contained in the geometry for cell in self.get_all_cells().values(): # Recursively remove redundant surfaces from regions - cell.region.remove_redundant_surfaces(redundant_surfaces) + if cell.region: + cell.region.remove_redundant_surfaces(redundant_surfaces) def determine_paths(self, instances_only=False): """Determine paths through CSG tree for cells and materials.