diff options
Diffstat (limited to 'src/client/PluginModel.cpp')
-rw-r--r-- | src/client/PluginModel.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp index 694e5ce0..80b78887 100644 --- a/src/client/PluginModel.cpp +++ b/src/client/PluginModel.cpp @@ -238,9 +238,11 @@ PluginModel::documentation() const LilvNodes* vals = lilv_plugin_get_value(_lilv_plugin, rdfs_comment); - const LilvNode* val = lilv_nodes_get_first(vals); - if (lilv_node_is_string(val)) { - doc += lilv_node_as_string(val); + if (vals) { + const LilvNode* val = lilv_nodes_get_first(vals); + if (lilv_node_is_string(val)) { + doc += lilv_node_as_string(val); + } } lilv_node_free(rdfs_comment); lilv_nodes_free(vals); @@ -266,9 +268,11 @@ PluginModel::port_documentation(uint32_t index) const LilvNodes* vals = lilv_port_get_value(_lilv_plugin, port, rdfs_comment); - const LilvNode* val = lilv_nodes_get_first(vals); - if (lilv_node_is_string(val)) { - doc += lilv_node_as_string(val); + if (vals) { + const LilvNode* val = lilv_nodes_get_first(vals); + if (lilv_node_is_string(val)) { + doc += lilv_node_as_string(val); + } } lilv_node_free(rdfs_comment); lilv_nodes_free(vals); |