Don't call memcpy when p->segment is NULL

svn path=/trunk/netsurf/; revision=9687
This commit is contained in:
John Mark Bell 2009-11-22 13:49:43 +00:00
parent 51d545772c
commit 81c1b0e0df
1 changed files with 2 additions and 1 deletions

View File

@ -655,7 +655,8 @@ void urldb_write_paths(const struct path_data *parent, const char *host,
*path_alloc = (len > 64) ? len : *path_alloc + 64;
}
memcpy(*path + *path_used - 1, p->segment, seglen);
if (p->segment != NULL)
memcpy(*path + *path_used - 1, p->segment, seglen);
if (p->children != NULL) {
(*path)[*path_used + seglen - 1] = '/';