Fixed issue #1874 (crash when copying a cell to another layout)

This commit is contained in:
Matthias Koefferlein 2024-09-28 17:53:26 +02:00
parent 2d4f5d822c
commit 0dd7dfb48a
1 changed files with 4 additions and 2 deletions

View File

@ -158,8 +158,10 @@ ClipboardData::do_insert (db::Layout &layout, const db::ICplxTrans *trans, db::C
{
// identify the cells our target is eventually called from, including itself
std::set<db::cell_index_type> callers;
cell->collect_caller_cells (callers);
callers.insert (cell->cell_index ());
if (cell) {
cell->collect_caller_cells (callers);
callers.insert (cell->cell_index ());
}
std::vector <unsigned int> new_layers;
PropertyMapper prop_id_map (&layout, &m_layout);