diff options
Diffstat (limited to 'src/engine/events/CreatePort.cpp')
-rw-r--r-- | src/engine/events/CreatePort.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/engine/events/CreatePort.cpp b/src/engine/events/CreatePort.cpp index 4aebc0b2..33477400 100644 --- a/src/engine/events/CreatePort.cpp +++ b/src/engine/events/CreatePort.cpp @@ -96,7 +96,9 @@ CreatePort::pre_process() : 0; Shared::Resource::Properties::const_iterator index_i = _properties.find(uris.lv2_index); - if (index_i->second.type() != Atom::INT + if (index_i == _properties.end()) { + index_i = _properties.insert(make_pair(uris.lv2_index, (int)old_num_ports)); + } else if (index_i->second.type() != Atom::INT || index_i->second.get_int32() != static_cast<int32_t>(old_num_ports)) { QueuedEvent::pre_process(); _error = BAD_INDEX; |