From 41f1be0a68676f33dc1d7dfbb32c5d6440ebd4c9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 23 Sep 2011 22:00:38 +0000 Subject: Fix broken iterator use (memory errors on erase) in ResourceImpl::set_property. Load all required modules before starting jack (Jack went crazy sometimes otherwise, particularly with ingen running in gdb). Fix insane non-const reference return to Resource::set_property. Exit cleanly on interrupt (Ctrl-C) and terminate (kill). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3480 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/ObjectModel.cpp | 4 ++-- src/client/PluginModel.cpp | 2 +- src/client/PortModel.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/client') diff --git a/src/client/ObjectModel.cpp b/src/client/ObjectModel.cpp index a0235bb6..940bd51e 100644 --- a/src/client/ObjectModel.cpp +++ b/src/client/ObjectModel.cpp @@ -47,11 +47,11 @@ ObjectModel::~ObjectModel() { } -Raul::Atom& +const Raul::Atom& ObjectModel::set_property(const Raul::URI& key, const Raul::Atom& value, Resource::Graph ctx) { - Raul::Atom& my_value = ResourceImpl::set_property(key, value, ctx); + const Raul::Atom& my_value = ResourceImpl::set_property(key, value, ctx); _signal_property.emit(key, my_value); return my_value; } diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp index c9395ccd..694e5ce0 100644 --- a/src/client/PluginModel.cpp +++ b/src/client/PluginModel.cpp @@ -94,7 +94,7 @@ PluginModel::get_property(const URI& key) const } if (_lilv_plugin) { - boost::optional ret; + boost::optional ret; LilvNode* lv2_pred = lilv_new_uri(_lilv_world, key.str().c_str()); LilvNodes* values = lilv_plugin_get_value(_lilv_plugin, lv2_pred); lilv_node_free(lv2_pred); diff --git a/src/client/PortModel.cpp b/src/client/PortModel.cpp index fe85e108..8404d60e 100644 --- a/src/client/PortModel.cpp +++ b/src/client/PortModel.cpp @@ -22,12 +22,12 @@ namespace Ingen { namespace Client { -Raul::Atom& +const Raul::Atom& PortModel::set_property(const Raul::URI& uri, const Raul::Atom& value, Resource::Graph ctx) { - Raul::Atom& ret = ObjectModel::set_property(uri, value, ctx); + const Raul::Atom& ret = ObjectModel::set_property(uri, value, ctx); if (uri == _uris.ingen_value) this->value(value); return ret; -- cgit v1.2.1