diff options
Diffstat (limited to 'src/PatchageModule.cpp')
-rw-r--r-- | src/PatchageModule.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/PatchageModule.cpp b/src/PatchageModule.cpp index 2cdc977..b929eeb 100644 --- a/src/PatchageModule.cpp +++ b/src/PatchageModule.cpp @@ -147,8 +147,9 @@ PatchagePort* PatchageModule::get_port(const std::string& name) { for (iterator p = begin(); p != end(); ++p) { - if ((*p)->get_label() == name) { - return dynamic_cast<PatchagePort*>(*p); + PatchagePort* pport = dynamic_cast<PatchagePort*>(*p); + if (pport && pport->name() == name) { + return pport; } } |