diff options
author | David Robillard <d@drobilla.net> | 2009-06-03 21:47:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-06-03 21:47:19 +0000 |
commit | 3ee5e87fc15363c104f08e61ba8ed0da76f97152 (patch) | |
tree | 983ddefeeb5194e0a86887244c6b12ddba38ab1d /utils/lv2_inspect.c | |
parent | c220a3ce918293855ed6b53b97dc604573fd031a (diff) | |
download | lilv-3ee5e87fc15363c104f08e61ba8ed0da76f97152.tar.gz lilv-3ee5e87fc15363c104f08e61ba8ed0da76f97152.tar.bz2 lilv-3ee5e87fc15363c104f08e61ba8ed0da76f97152.zip |
Consistent error/warning message output.
Fix crash on invalid plugin files.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2086 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'utils/lv2_inspect.c')
-rw-r--r-- | utils/lv2_inspect.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/utils/lv2_inspect.c b/utils/lv2_inspect.c index 8278fe6..263374c 100644 --- a/utils/lv2_inspect.c +++ b/utils/lv2_inspect.c @@ -102,11 +102,15 @@ print_plugin(SLV2Plugin p) printf("%s\n\n", slv2_value_as_uri(slv2_plugin_get_uri(p))); val = slv2_plugin_get_name(p); - printf("\tName: %s\n", slv2_value_as_string(val)); - slv2_value_free(val); + if (val) { + printf("\tName: %s\n", slv2_value_as_string(val)); + slv2_value_free(val); + } SLV2Value class_label = slv2_plugin_class_get_label(slv2_plugin_get_class(p)); - printf("\tClass: %s\n", slv2_value_as_string(class_label)); + if (class_label) { + printf("\tClass: %s\n", slv2_value_as_string(class_label)); + } val = slv2_plugin_get_author_name(p); if (val) { |