summaryrefslogtreecommitdiffstats
path: root/src/client/ClientStore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/ClientStore.cpp')
-rw-r--r--src/client/ClientStore.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index 02f5f4f0..f5c99e38 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -289,16 +289,17 @@ ClientStore::put(const Raul::URI& uri,
PortModel::Direction pdir = (is_output)
? PortModel::Direction::OUTPUT
: PortModel::Direction::INPUT;
- const Iterator i = properties.find(_uris.lv2_index);
+ uint32_t index = 0;
+ const Iterator i = properties.find(_uris.lv2_index);
if (i != properties.end() && i->second.type() == _uris.forge.Int) {
- const uint32_t index = i->second.get<int32_t>();
- SPtr<PortModel> p(
- new PortModel(uris(), path, index, pdir));
- p->set_properties(properties);
- add_object(p);
+ index = i->second.get<int32_t>();
} else {
_log.error(fmt("Port %1% has no index\n") % path);
}
+
+ SPtr<PortModel> p(new PortModel(uris(), path, index, pdir));
+ p->set_properties(properties);
+ add_object(p);
} else {
_log.warn(fmt("Ignoring object %1% with unknown type\n")
% path.c_str());