aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-09-27 18:52:55 -0400
committerDavid Robillard <d@drobilla.net>2024-09-27 18:52:55 -0400
commit57032cb1c06a24554586552abdb75530a7806849 (patch)
tree2925c60d91ad72b1c3e9f43cef77a5859b4b6ab5
parenta3fd8b05a7b062256dd298d929fb99f8f3757f73 (diff)
downloadserd-57032cb1c06a24554586552abdb75530a7806849.tar.gz
serd-57032cb1c06a24554586552abdb75530a7806849.tar.bz2
serd-57032cb1c06a24554586552abdb75530a7806849.zip
Fix potential null dereference
-rw-r--r--src/uri.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/uri.c b/src/uri.c
index 189ee2b7..b18cd3aa 100644
--- a/src/uri.c
+++ b/src/uri.c
@@ -441,7 +441,7 @@ serd_uri_serialise_relative(const SerdURI* const uri,
SERD_DISABLE_NULL_WARNINGS
- if (!relative || (!len && base->query.buf)) {
+ if (!relative || (!len && base && base->query.buf)) {
if (uri->scheme.buf) {
len += sink(uri->scheme.buf, uri->scheme.len, stream);
len += sink(":", 1, stream);