diff options
author | David Robillard <d@drobilla.net> | 2012-01-03 20:57:48 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-01-03 20:57:48 +0000 |
commit | d1e9dbbba3b4bb91506ad0dab1f7a0e833ac8d36 (patch) | |
tree | 2ca1f5a370c63890f9a2110389350da3f89335a5 /src/node.c | |
parent | 01a8e74e7803f85932026b7214f3d4dc7ceb66cb (diff) | |
download | lilv-d1e9dbbba3b4bb91506ad0dab1f7a0e833ac8d36.tar.gz lilv-d1e9dbbba3b4bb91506ad0dab1f7a0e833ac8d36.tar.bz2 lilv-d1e9dbbba3b4bb91506ad0dab1f7a0e833ac8d36.zip |
Improved coverage for plugin.c.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3911 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/node.c')
-rw-r--r-- | src/node.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -349,7 +349,7 @@ LILV_API const char* lilv_node_as_string(const LilvNode* value) { - return value->str_val; + return value ? value->str_val : NULL; } LILV_API @@ -380,10 +380,11 @@ float lilv_node_as_float(const LilvNode* value) { assert(lilv_node_is_float(value) || lilv_node_is_int(value)); - if (lilv_node_is_float(value)) + if (lilv_node_is_float(value)) { return value->val.float_val; - else // lilv_node_is_int(value) + } else { // lilv_node_is_int(value) return (float)value->val.int_val; + } } LILV_API |