Fixed vhdlpp segfault if it processes an entity without any ports declared.

This commit is contained in:
Maciej Suminski 2014-08-01 15:13:19 +02:00 committed by Stephen Williams
parent 6a2956c672
commit 66d31b02be
1 changed files with 6 additions and 3 deletions

View File

@ -47,9 +47,12 @@ void ComponentBase::set_interface(std::list<InterfacePort*>*parms,
parms->pop_front();
}
}
while (! ports->empty()) {
ports_.push_back(ports->front());
ports->pop_front();
if (ports) {
while (! ports->empty()) {
ports_.push_back(ports->front());
ports->pop_front();
}
}
}