diff options
author | David Robillard <d@drobilla.net> | 2007-09-30 18:22:54 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-09-30 18:22:54 +0000 |
commit | 09bf0ca18301b9ef7a4360be35d2d1921a0d28d8 (patch) | |
tree | 8e963a7cbded5bf2e367fccef999fb5856093388 /src/values.c | |
parent | a55a5eaac9d245ba0b4360316118ce4d3e101f11 (diff) | |
download | lilv-09bf0ca18301b9ef7a4360be35d2d1921a0d28d8.tar.gz lilv-09bf0ca18301b9ef7a4360be35d2d1921a0d28d8.tar.bz2 lilv-09bf0ca18301b9ef7a4360be35d2d1921a0d28d8.zip |
Be more tolerant of NULL collections (appear as if they're empty instead of dying).
Fix lv2_inspect crash on GUI-less plugins.
git-svn-id: http://svn.drobilla.net/lad/slv2@787 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/values.c')
-rw-r--r-- | src/values.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); } |