NULL check before use

This commit is contained in:
Eddie Hung 2019-04-16 12:59:48 -07:00
parent f22aa4422d
commit fed1f0ba63
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ struct XAigerWriter
co_bits.emplace_back(b, 0); co_bits.emplace_back(b, 0);
else { else {
output_bits.insert(b); output_bits.insert(b);
if (!b.wire->port_input) if (b.wire && !b.wire->port_input)
unused_bits.erase(b); unused_bits.erase(b);
} }
} }