aboutsummaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2020-01-21 19:06:46 +0000
committerDavid Shah <dave@ds0.me>2020-01-21 19:06:46 +0000
commitf1dbb0c4f2242862dd365da8865e059d2c05a310 (patch)
tree54b31756f5fdbb78cd36bf76e700f8ca57e4055e /generic
parent9dc8e1e35d7ab1226207b49e89a4de0194b39b81 (diff)
downloadnextpnr-f1dbb0c4f2242862dd365da8865e059d2c05a310.tar.gz
nextpnr-f1dbb0c4f2242862dd365da8865e059d2c05a310.tar.bz2
nextpnr-f1dbb0c4f2242862dd365da8865e059d2c05a310.zip
Fix latent bug in generic out-of-context IO mode
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'generic')
-rw-r--r--generic/pack.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/pack.cc b/generic/pack.cc
index e92e04c5..f3aa9880 100644
--- a/generic/pack.cc
+++ b/generic/pack.cc
@@ -263,7 +263,8 @@ static void pack_io(Context *ctx)
iob = new_cells.back().get();
}
packed_cells.insert(ci->name);
- std::copy(ci->attrs.begin(), ci->attrs.end(), std::inserter(iob->attrs, iob->attrs.begin()));
+ if (iob != nullptr)
+ std::copy(ci->attrs.begin(), ci->attrs.end(), std::inserter(iob->attrs, iob->attrs.begin()));
}
}
for (auto pcell : packed_cells) {