From 0dd7dfb48a7b4e5fc03b755d261225bcc1eb976a Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 28 Sep 2024 17:53:26 +0200 Subject: [PATCH] Fixed issue #1874 (crash when copying a cell to another layout) --- src/db/db/dbClipboardData.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/db/db/dbClipboardData.cc b/src/db/db/dbClipboardData.cc index 453f6ae31..9c1b1ffeb 100644 --- a/src/db/db/dbClipboardData.cc +++ b/src/db/db/dbClipboardData.cc @@ -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 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 new_layers; PropertyMapper prop_id_map (&layout, &m_layout);