diff options
-rw-r--r-- | src/pluginclasses.c | 3 | ||||
-rw-r--r-- | src/plugins.c | 4 | ||||
-rw-r--r-- | src/pluginuis.c | 5 | ||||
-rw-r--r-- | src/values.c | 5 |
4 files changed, 10 insertions, 7 deletions
diff --git a/src/pluginclasses.c b/src/pluginclasses.c index 5cf56ec..1b578f1 100644 --- a/src/pluginclasses.c +++ b/src/pluginclasses.c @@ -38,6 +38,7 @@ void slv2_plugin_classes_free(SLV2PluginClasses list) { //if (list != world->plugin_classes) + if (list) raptor_free_sequence(list); } @@ -45,7 +46,7 @@ slv2_plugin_classes_free(SLV2PluginClasses list) unsigned slv2_plugin_classes_size(SLV2PluginClasses list) { - return raptor_sequence_size(list); + return (list ? raptor_sequence_size(list) : 0); } diff --git a/src/plugins.c b/src/plugins.c index d524122..9d3214e 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -42,7 +42,7 @@ slv2_plugins_new() void slv2_plugins_free(SLV2World world, SLV2Plugins list) { - if (list != world->plugins) + if (list && list != world->plugins) raptor_free_sequence(list); } @@ -268,7 +268,7 @@ slv2_plugins_load_path(SLV2Plugins list, unsigned slv2_plugins_size(SLV2Plugins list) { - return raptor_sequence_size(list); + return (list ? raptor_sequence_size(list) : 0); } diff --git a/src/pluginuis.c b/src/pluginuis.c index 5d01bae..bc4b66b 100644 --- a/src/pluginuis.c +++ b/src/pluginuis.c @@ -41,14 +41,15 @@ slv2_uis_new() void slv2_uis_free(SLV2UIs list) { - raptor_free_sequence(list); + if (list) + raptor_free_sequence(list); } unsigned slv2_uis_size(SLV2UIs list) { - return raptor_sequence_size(list); + return (list ? raptor_sequence_size(list) : 0); } diff --git a/src/values.c b/src/values.c index 4920454..02544cd 100644 --- a/src/values.c +++ b/src/values.c @@ -34,14 +34,15 @@ slv2_values_new() void slv2_values_free(SLV2Values list) { - raptor_free_sequence(list); + if (list) + raptor_free_sequence(list); } unsigned slv2_values_size(SLV2Values list) { - return raptor_sequence_size(list); + return (list ? raptor_sequence_size(list) : 0); } |