NULL check before use
authorEddie Hung <eddie@fpgeh.com>
Tue, 16 Apr 2019 19:59:48 +0000 (12:59 -0700)
committerEddie Hung <eddie@fpgeh.com>
Tue, 16 Apr 2019 19:59:48 +0000 (12:59 -0700)
backends/aiger/xaiger.cc

index f7c75775489ad282349da809899b72a9fe493682..875a2ec03ddf602f17a496b9bdc9b9b444df7ec9 100644 (file)
@@ -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);
                                                        }
                                                }