From 595998bf6691ba8af0084e2be29b118fdd5b7e0d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 5 Mar 2011 19:29:27 +0000 Subject: Warn when plugin lv2:binary is missing. Don't crash lv2_inspect when lv2:binary is missing. git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@3040 a436a847-0d15-0410-975c-d299462d15a1 --- utils/lv2_inspect.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/lv2_inspect.c b/utils/lv2_inspect.c index 5a405ce..26f8bb2 100644 --- a/utils/lv2_inspect.c +++ b/utils/lv2_inspect.c @@ -168,8 +168,14 @@ print_plugin(SLV2Plugin p) printf("\tHas latency: no\n"); } - printf("\tBundle: %s\n", slv2_value_as_uri(slv2_plugin_get_bundle_uri(p))); - printf("\tBinary: %s\n", slv2_value_as_uri(slv2_plugin_get_library_uri(p))); + printf("\tBundle: %s\n", + slv2_value_as_uri(slv2_plugin_get_bundle_uri(p))); + + SLV2Value binary_uri = slv2_plugin_get_library_uri(p); + if (binary_uri) { + printf("\tBinary: %s\n", + slv2_value_as_uri(slv2_plugin_get_library_uri(p))); + } SLV2UIs uis = slv2_plugin_get_uis(p); if (slv2_values_size(uis) > 0) { -- cgit v1.2.1