From d09cfd0f5e6a1290ed5e90959f633b3c2d3e9386 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 14 Aug 2008 04:24:10 +0000 Subject: Fix deadlock. git-svn-id: http://svn.drobilla.net/lad/ingen@1369 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/PluginModel.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/libs/client') 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 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"); -- cgit v1.2.1