From c68a20ee1fca5d6c076d0f754653f48f508279d0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 3 Jun 2009 22:07:02 +0000 Subject: Tolerate lv2_inspect of broken plugins with illegal ports. Shave some overhead from port loading. git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2087 a436a847-0d15-0410-975c-d299462d15a1 --- utils/lv2_inspect.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'utils') diff --git a/utils/lv2_inspect.c b/utils/lv2_inspect.c index 263374c..7b3d594 100644 --- a/utils/lv2_inspect.c +++ b/utils/lv2_inspect.c @@ -34,6 +34,11 @@ print_port(SLV2Plugin p, uint32_t index, float* mins, float* maxes, float* defau printf("\n\tPort %d:\n", index); + if (!port) { + printf("\t\tERROR: Illegal/nonexistent port\n"); + return; + } + SLV2Values classes = slv2_port_get_classes(p, port); printf("\t\tClasses:\n"); -- cgit v1.2.1