mirror of
https://github.com/KLayout/klayout.git
synced 2026-08-22 05:57:41 +02:00
[Consider merging] avoid a memory corruption issue in Netlist::flatten
This commit is contained in:
@@ -505,6 +505,8 @@ void Netlist::flatten_circuit (Circuit *circuit)
|
|||||||
|
|
||||||
void Netlist::flatten ()
|
void Netlist::flatten ()
|
||||||
{
|
{
|
||||||
|
db::NetlistLocker locker (this);
|
||||||
|
|
||||||
std::set<db::Circuit *> top_circuits;
|
std::set<db::Circuit *> top_circuits;
|
||||||
size_t ntop = top_circuit_count ();
|
size_t ntop = top_circuit_count ();
|
||||||
for (db::Netlist::top_down_circuit_iterator tc = begin_top_down (); tc != end_top_down () && ntop > 0; ++tc) {
|
for (db::Netlist::top_down_circuit_iterator tc = begin_top_down (); tc != end_top_down () && ntop > 0; ++tc) {
|
||||||
|
|||||||
Reference in New Issue
Block a user