mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-07 19:51:32 +02:00
Bugfix: removing a pin from a Circuit does not crash if the pin was not disconnected before. Now it's disconnected automatically.
This commit is contained in:
@@ -353,6 +353,7 @@ Pin &Circuit::add_pin (const std::string &name)
|
||||
void Circuit::remove_pin (size_t id)
|
||||
{
|
||||
if (id < m_pin_by_id.size () && ! tl::is_null_iterator (m_pin_by_id [id])) {
|
||||
connect_pin (id, 0);
|
||||
m_pins.erase (m_pin_by_id [id]);
|
||||
m_pin_by_id [id] = pin_list::iterator ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user