mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-04-16 00:21:46 +00:00
BaseCtx : Fix crash in getNetByAlias()
This commit is contained in:
committed by
myrtle
parent
9b51c6e337
commit
cc04882b17
@@ -213,7 +213,9 @@ struct BaseCtx
|
||||
|
||||
NetInfo *getNetByAlias(IdString alias) const
|
||||
{
|
||||
return nets.count(alias) ? nets.at(alias).get() : nets.at(net_aliases.at(alias)).get();
|
||||
if(nets.count(alias) > 0) return nets.at(alias).get();
|
||||
if(net_aliases.count(alias) == 0) return nullptr;
|
||||
return nets.at(net_aliases.at(alias)).get();
|
||||
}
|
||||
|
||||
// Intended to simplify Python API
|
||||
|
||||
Reference in New Issue
Block a user