summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
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>