From: Eddie Hung Date: Tue, 16 Apr 2019 19:59:48 +0000 (-0700) Subject: NULL check before use X-Git-Tag: working-ls180~1208^2~336 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fed1f0ba637941cc0c2c4cc75c08ba7e3994c1a0;p=yosys.git NULL check before use --- diff --git a/backends/aiger/xaiger.cc b/backends/aiger/xaiger.cc index f7c757754..875a2ec03 100644 --- a/backends/aiger/xaiger.cc +++ b/backends/aiger/xaiger.cc @@ -231,7 +231,7 @@ struct XAigerWriter co_bits.emplace_back(b, 0); else { output_bits.insert(b); - if (!b.wire->port_input) + if (b.wire && !b.wire->port_input) unused_bits.erase(b); } }