diff --git a/src/db/db/dbDeepShapeStore.cc b/src/db/db/dbDeepShapeStore.cc index 44c7f8ea0..6a1539e95 100644 --- a/src/db/db/dbDeepShapeStore.cc +++ b/src/db/db/dbDeepShapeStore.cc @@ -920,7 +920,7 @@ DeepShapeStore::cell_mapping_to_original (unsigned int layout_index, db::Layout // create from them. We need to consider however, that the hierarchy builder is allowed to create // variants which we cannot map. - for (HierarchyBuilder::cell_map_type::const_iterator m = original_builder.begin_cell_map (); m != original_builder.end_cell_map (); ++m) { + for (HierarchyBuilder::cell_map_type::const_iterator m = original_builder.begin_cell_map (); m != original_builder.end_cell_map (); ) { HierarchyBuilder::cell_map_type::const_iterator mm = m; ++mm; @@ -940,6 +940,8 @@ DeepShapeStore::cell_mapping_to_original (unsigned int layout_index, db::Layout } } + m = mm; + } } else if (into_layout->cells () == 1) {