Fix the other half of this NULL dereference issue

svn path=/trunk/netsurf/; revision=9695
This commit is contained in:
John Mark Bell 2009-11-22 14:21:47 +00:00
parent aaa14e7672
commit 8685cfb3b7

View File

@ -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;