sim: Avoid a crash on empty cell connection.

Fixes #2513.
This commit is contained in:
Marcelina Kościelnicka 2021-03-01 20:01:39 +01:00
parent 760284033d
commit c00a29296c
1 changed files with 1 additions and 1 deletions

View File

@ -271,7 +271,7 @@ struct SimInstance
{
auto child = children.at(cell);
for (auto &conn: cell->connections())
if (cell->input(conn.first)) {
if (cell->input(conn.first) && GetSize(conn.second)) {
Const value = get_state(conn.second);
child->set_state(child->module->wire(conn.first), value);
}