summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-08-29 04:06:09 +0000
committerDavid Robillard <d@drobilla.net>2015-08-29 04:06:09 +0000
commitcec7f9f4ac1e601bc0e1b452d260c20a598361dd (patch)
tree71f4474eb2b2448cc8e86b63f22efebcf95e007b /src/client
parent67dea1f9cf0dbce6be323949557eab3254dc3592 (diff)
downloadingen-cec7f9f4ac1e601bc0e1b452d260c20a598361dd.tar.gz
ingen-cec7f9f4ac1e601bc0e1b452d260c20a598361dd.tar.bz2
ingen-cec7f9f4ac1e601bc0e1b452d260c20a598361dd.zip
Fix checking non-LV2 'plugins' for UIs.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5715 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client')
-rw-r--r--src/client/PluginModel.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp
index 93a48acf..5483b427 100644
--- a/src/client/PluginModel.cpp
+++ b/src/client/PluginModel.cpp
@@ -227,11 +227,13 @@ PluginModel::port_scale_points(uint32_t i) const
bool
PluginModel::has_ui() const
{
- LilvUIs* uis = lilv_plugin_get_uis(_lilv_plugin);
- const bool ret = (lilv_nodes_size(uis) > 0);
- lilv_uis_free(uis);
- return ret;
-
+ if (_lilv_plugin) {
+ LilvUIs* uis = lilv_plugin_get_uis(_lilv_plugin);
+ const bool ret = (lilv_nodes_size(uis) > 0);
+ lilv_uis_free(uis);
+ return ret;
+ }
+ return false;
}
SPtr<PluginUI>