From cec7f9f4ac1e601bc0e1b452d260c20a598361dd Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 29 Aug 2015 04:06:09 +0000 Subject: Fix checking non-LV2 'plugins' for UIs. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5715 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/PluginModel.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/client') 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 -- cgit v1.2.1