summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pluginclass.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pluginclass.c b/src/pluginclass.c
index b3da0b5..383e458 100644
--- a/src/pluginclass.c
+++ b/src/pluginclass.c
@@ -43,8 +43,10 @@ slv2_plugin_class_new(SLV2World world, const char* parent_uri, const char* uri,
void
slv2_plugin_class_free(SLV2PluginClass plugin_class)
{
+ assert(plugin_class->uri);
librdf_free_uri(plugin_class->uri);
- librdf_free_uri(plugin_class->parent_uri);
+ if (plugin_class->parent_uri)
+ librdf_free_uri(plugin_class->parent_uri);
free(plugin_class->label);
free(plugin_class);
}