From 57032cb1c06a24554586552abdb75530a7806849 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 27 Sep 2024 18:52:55 -0400 Subject: Fix potential null dereference --- src/uri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.1