summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/urldb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/content/urldb.c b/content/urldb.c
index 6b63eaa64..50c15810d 100644
--- a/content/urldb.c
+++ b/content/urldb.c
@@ -720,7 +720,8 @@ void urldb_write_paths(const struct path_data *parent, const char *host,
/* Now, find next node to process. */
while (p != parent) {
- int seglen = strlen(p->segment);
+ int seglen = p->segment != NULL
+ ? strlen(p->segment) : 0;
/* Remove our segment from the path */
*path_used -= seglen;