Merge pull request #1875 from KLayout/issue-1874

Fixed issue #1874 (crash when copying a cell to another layout)
This commit is contained in:
Matthias Köfferlein 2024-10-06 18:20:29 +02:00 committed by GitHub
commit 0f79b44621
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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);