diff options
author | David Robillard <d@drobilla.net> | 2012-03-08 17:46:45 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-03-08 17:46:45 +0000 |
commit | 362fa1151017494b629d4db81487671557bef0a3 (patch) | |
tree | 0077dd71ffd46be204ccdb7d7fd5c13ad453406f /src/node.c | |
parent | 1725dfdf7c446449e64173ef41fd42465e2bae53 (diff) | |
download | serd-362fa1151017494b629d4db81487671557bef0a3.tar.gz serd-362fa1151017494b629d4db81487671557bef0a3.tar.bz2 serd-362fa1151017494b629d4db81487671557bef0a3.zip |
Make serd_node_from_string tolerate NULL.
git-svn-id: http://svn.drobilla.net/serd/trunk@332 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/node.c')
-rw-r--r-- | src/node.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -26,6 +26,10 @@ SERD_API SerdNode serd_node_from_string(SerdType type, const uint8_t* buf) { + if (!buf) { + return SERD_NODE_NULL; + } + uint32_t flags = 0; size_t buf_n_bytes = 0; const size_t buf_n_chars = serd_strlen(buf, &buf_n_bytes, &flags); |