aboutsummaryrefslogtreecommitdiffstats
path: root/src/uri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uri.c')
-rw-r--r--src/uri.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/uri.c b/src/uri.c
index 8f3bb997..6f7380b0 100644
--- a/src/uri.c
+++ b/src/uri.c
@@ -100,7 +100,7 @@ bool
serd_uri_string_has_scheme(const uint8_t* utf8)
{
// RFC3986: scheme ::= ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
- if (!is_alpha(utf8[0])) {
+ if (!utf8 || !is_alpha(utf8[0])) {
return false; // Invalid scheme initial character, URI is relative
}
for (uint8_t c; (c = *++utf8) != '\0';) {