BaseCtx : Fix crash in getNetByAlias()
This commit is contained in:
parent
9b51c6e337
commit
cc04882b17
@ -213,7 +213,9 @@ struct BaseCtx
|
|||||||
|
|
||||||
NetInfo *getNetByAlias(IdString alias) const
|
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
|
// Intended to simplify Python API
|
||||||
|
Loading…
Reference in New Issue
Block a user