From ebaeb659cd43958f91bd93b29e2e0948f983c05b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 9 Jun 2009 20:51:14 +0000 Subject: Fix crash for illegal plugins with invalid ports. git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2094 a436a847-0d15-0410-975c-d299462d15a1 --- src/plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugin.c b/src/plugin.c index 26168e2..9564336 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -586,7 +586,7 @@ slv2_plugin_get_num_ports_of_class(SLV2Plugin p, for (unsigned i=0; i < p->num_ports; ++i) { SLV2Port port = p->ports[i]; - if (!slv2_port_is_a(p, port, class_1)) + if (!port || !slv2_port_is_a(p, port, class_1)) continue; va_start(args, class_1); -- cgit v1.2.1