Fixed #646 (crash on delete of library) (#685)

* Fixed a compiler warning

* Fixed #646 (crash on PCell Library "delete")

The issue was mainly caused by a "cleanup" call on
the library. Cleanup is supposed to remove excess
top level PCell variants. For libraries this is not
possible, as the library does not know which variants
are used and which are not.

In addition, some hardening against segfaults in
case of defect layouts has been applied.
This commit is contained in:
Matthias Köfferlein
2020-11-27 18:36:56 +01:00
committed by GitHub
parent 22df10f425
commit 511e30ef45
5 changed files with 51 additions and 5 deletions
+3
View File
@@ -59,6 +59,9 @@ LayoutHandle::LayoutHandle (db::Layout *layout, const std::string &filename)
m_dirty (false),
m_save_options_valid (false)
{
// layouts in the managed layouts space participate in spare proxy cleanup
layout->do_cleanup (true);
file_watcher ().add_file (m_filename);
if (! m_filename.empty ()) {