summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/port.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/port.c b/src/port.c
index b14f43a..037fc97 100644
--- a/src/port.c
+++ b/src/port.c
@@ -39,10 +39,12 @@ lilv_port_new(LilvWorld* world,
void
lilv_port_free(const LilvPlugin* plugin, LilvPort* port)
{
- sord_node_free(plugin->world->world, port->node);
- lilv_nodes_free(port->classes);
- lilv_node_free(port->symbol);
- free(port);
+ if (port) {
+ sord_node_free(plugin->world->world, port->node);
+ lilv_nodes_free(port->classes);
+ lilv_node_free(port->symbol);
+ free(port);
+ }
}
LILV_API