fix crash when no fst input
authorMiodrag Milanovic <mmicko@gmail.com>
Wed, 4 May 2022 09:21:39 +0000 (11:21 +0200)
committerMiodrag Milanovic <mmicko@gmail.com>
Wed, 4 May 2022 09:21:39 +0000 (11:21 +0200)
passes/sat/sim.cc

index 654378d09ec234ae84c043830905ad4c37b6f49d..d085fab2dfec4b233598c04a77d7425be26f1528 100644 (file)
@@ -246,7 +246,8 @@ struct SimInstance
                        {
                                std::string name = cell->parameters.at(ID::MEMID).decode_string();
                                mem_cells[cell] = name;
-                               fst_memories[name] = shared->fst->getMemoryHandles(scope + "." + RTLIL::unescape_id(name));
+                               if (shared->fst)
+                                       fst_memories[name] = shared->fst->getMemoryHandles(scope + "." + RTLIL::unescape_id(name));
                        }
                        if (cell->type.in(ID($assert), ID($cover), ID($assume))) {
                                formal_database.insert(cell);