From 1bdcf3843770e085adbb7d665153b7a4d6ee7b7b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 4 Oct 2015 19:28:20 +0000 Subject: Improve test coverage git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5742 a436a847-0d15-0410-975c-d299462d15a1 --- src/pluginclass.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/pluginclass.c') diff --git a/src/pluginclass.c b/src/pluginclass.c index f6f6cc6..0afb39a 100644 --- a/src/pluginclass.c +++ b/src/pluginclass.c @@ -1,5 +1,5 @@ /* - Copyright 2007-2014 David Robillard + Copyright 2007-2015 David Robillard Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -14,7 +14,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include #include @@ -26,9 +25,6 @@ lilv_plugin_class_new(LilvWorld* world, const SordNode* uri, const char* label) { - if (parent_node && sord_node_get_type(parent_node) != SORD_URI) { - return NULL; // Not an LV2 plugin superclass (FIXME: discover properly) - } LilvPluginClass* pc = (LilvPluginClass*)malloc(sizeof(LilvPluginClass)); pc->world = world; pc->uri = lilv_node_new_from_node(world, uri); @@ -42,7 +38,10 @@ lilv_plugin_class_new(LilvWorld* world, void lilv_plugin_class_free(LilvPluginClass* plugin_class) { - assert(plugin_class->uri); + if (!plugin_class) { + return; + } + lilv_node_free(plugin_class->uri); lilv_node_free(plugin_class->parent_uri); lilv_node_free(plugin_class->label); -- cgit v1.2.1