aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/design_utils.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/design_utils.cc b/common/design_utils.cc
index a892feaa..da5decf9 100644
--- a/common/design_utils.cc
+++ b/common/design_utils.cc
@@ -161,7 +161,8 @@ void rename_net(Context *ctx, NetInfo *net, IdString new_name)
if (net == nullptr)
return;
NPNR_ASSERT(!ctx->nets.count(new_name));
- std::swap(ctx->nets[net->name], ctx->nets[new_name]);
+ ctx->nets[new_name];
+ std::swap(ctx->nets.at(net->name), ctx->nets.at(new_name));
ctx->nets.erase(net->name);
net->name = new_name;
}