summaryrefslogtreecommitdiffstats
path: root/src/port.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-12-13 05:47:50 +0000
committerDavid Robillard <d@drobilla.net>2008-12-13 05:47:50 +0000
commit90885da36afd20388a6eeeb58efcd844398bc531 (patch)
treea5cce42b5bae93d1c910a8a12af3d927bd8d114e /src/port.c
parentbaa2354cf47b093117206fd1fc1bae45e46b03c3 (diff)
downloadlilv-90885da36afd20388a6eeeb58efcd844398bc531.tar.gz
lilv-90885da36afd20388a6eeeb58efcd844398bc531.tar.bz2
lilv-90885da36afd20388a6eeeb58efcd844398bc531.zip
Handle librdf failures (NULL values) and crazily typed values etc. more gracefully.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@1860 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/port.c')
-rw-r--r--src/port.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/port.c b/src/port.c
index 27cc297..6baf13c 100644
--- a/src/port.c
+++ b/src/port.c
@@ -321,14 +321,14 @@ slv2_port_get_scale_points(SLV2Plugin p,
ret = slv2_scale_points_new();
while (!librdf_query_results_finished(results)) {
-
librdf_node* value_node = librdf_query_results_get_binding_value(results, 0);
librdf_node* label_node = librdf_query_results_get_binding_value(results, 1);
SLV2Value value = slv2_value_new_librdf_node(p->world, value_node);
SLV2Value label = slv2_value_new_librdf_node(p->world, label_node);
- raptor_sequence_push(ret, slv2_scale_point_new(value, label));
+ if (value && label)
+ raptor_sequence_push(ret, slv2_scale_point_new(value, label));
librdf_query_results_next(results);
}