diff options
author | David Robillard <d@drobilla.net> | 2008-08-14 04:24:10 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-08-14 04:24:10 +0000 |
commit | d09cfd0f5e6a1290ed5e90959f633b3c2d3e9386 (patch) | |
tree | 9fa2faeaf3d011f7f9d51ad3e97c5a5e71a3c286 /src | |
parent | 7793ef294616e522d13bb1706c2139411f91a6f4 (diff) | |
download | ingen-d09cfd0f5e6a1290ed5e90959f633b3c2d3e9386.tar.gz ingen-d09cfd0f5e6a1290ed5e90959f633b3c2d3e9386.tar.bz2 ingen-d09cfd0f5e6a1290ed5e90959f633b3c2d3e9386.zip |
Fix deadlock.
git-svn-id: http://svn.drobilla.net/lad/ingen@1369 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/client/PluginModel.cpp | 7 | ||||
-rw-r--r-- | src/libs/gui/PatchCanvas.cpp | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/libs/client/PluginModel.cpp b/src/libs/client/PluginModel.cpp index db62b3bf..aaf6b4b5 100644 --- a/src/libs/client/PluginModel.cpp +++ b/src/libs/client/PluginModel.cpp @@ -59,18 +59,19 @@ PluginModel::ui(Ingen::Shared::World* world, SharedPtr<NodeModel> node) const const string& PluginModel::icon_path() const { - if (_icon_path == "" && _type == LV2) + if (_icon_path == "" && _type == LV2) { + Glib::Mutex::Lock lock(_rdf_world->mutex()); _icon_path = get_lv2_icon_path(_slv2_plugin); + } return _icon_path; } +/** RDF world mutex must be held by the caller */ string PluginModel::get_lv2_icon_path(SLV2Plugin plugin) { - Glib::Mutex::Lock lock(_rdf_world->mutex()); - string result; SLV2Value svg_icon_pred = slv2_value_new_uri(_slv2_world, "http://ll-plugins.nongnu.org/lv2/namespace#svgIcon"); diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp index 5d85ac30..0fbf1854 100644 --- a/src/libs/gui/PatchCanvas.cpp +++ b/src/libs/gui/PatchCanvas.cpp @@ -186,7 +186,6 @@ PatchCanvas::build_plugin_class_menu(Gtk::Menu* menu, } } - const Store::Plugins& plugins = App::instance().store()->plugins(); // Add LV2 plugins @@ -216,8 +215,6 @@ PatchCanvas::build_plugin_class_menu(Gtk::Menu* menu, void PatchCanvas::build_plugin_menu() { - Glib::Mutex::Lock lock(PluginModel::rdf_world()->mutex()); - _menu->items().push_back(Gtk::Menu_Helpers::ImageMenuElem("Plugin", *(manage(new Gtk::Image(Gtk::Stock::EXECUTE, Gtk::ICON_SIZE_MENU))))); Gtk::MenuItem* plugin_menu_item = &(_menu->items().back()); @@ -225,6 +222,7 @@ PatchCanvas::build_plugin_menu() plugin_menu_item->set_submenu(*plugin_menu); _menu->reorder_child(*plugin_menu_item, 3); + Glib::Mutex::Lock lock(PluginModel::rdf_world()->mutex()); SLV2PluginClass lv2_plugin = slv2_world_get_plugin_class(PluginModel::slv2_world()); SLV2PluginClasses classes = slv2_world_get_plugin_classes(PluginModel::slv2_world()); |