diff options
author | David Robillard <d@drobilla.net> | 2012-01-08 04:23:05 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-01-08 04:23:05 +0000 |
commit | abd4d49c65afd967c813822a34b80b5a95bdebc3 (patch) | |
tree | 64ff5fc000879b4f71d16c7edf429430e8957c7d /src | |
parent | 1c18b0ba64be0e03867b95dff80bed3b4568c57b (diff) | |
download | lilv-abd4d49c65afd967c813822a34b80b5a95bdebc3.tar.gz lilv-abd4d49c65afd967c813822a34b80b5a95bdebc3.tar.bz2 lilv-abd4d49c65afd967c813822a34b80b5a95bdebc3.zip |
Fix crash on corrupt plugins (fix #800).
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3922 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/port.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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 |