summaryrefslogtreecommitdiffstats
path: root/src/pluginclass.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-10-04 19:28:20 +0000
committerDavid Robillard <d@drobilla.net>2015-10-04 19:28:20 +0000
commit1bdcf3843770e085adbb7d665153b7a4d6ee7b7b (patch)
treeb31c74f3e9f37915a42d42d69736af3528dad9a6 /src/pluginclass.c
parent464659f73bddf4a7d7b254ca3191cc1bf6dc9a31 (diff)
downloadlilv-1bdcf3843770e085adbb7d665153b7a4d6ee7b7b.tar.gz
lilv-1bdcf3843770e085adbb7d665153b7a4d6ee7b7b.tar.bz2
lilv-1bdcf3843770e085adbb7d665153b7a4d6ee7b7b.zip
Improve test coverage
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5742 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/pluginclass.c')
-rw-r--r--src/pluginclass.c11
1 files changed, 5 insertions, 6 deletions
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 <http://drobilla.net>
+ Copyright 2007-2015 David Robillard <http://drobilla.net>
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 <assert.h>
#include <stdlib.h>
#include <string.h>
@@ -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);