mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 06:21:45 +03:00
Correctly create a sentinel and initialise user_list with it when cloning a content
svn path=/trunk/netsurf/; revision=12804
This commit is contained in:
parent
e82c5be653
commit
033823e64e
@ -1118,8 +1118,14 @@ struct content *content_clone(struct content *c)
|
||||
*/
|
||||
nserror content__clone(const struct content *c, struct content *nc)
|
||||
{
|
||||
struct content_user *user_sentinel;
|
||||
nserror error;
|
||||
|
||||
user_sentinel = talloc_zero(c, struct content_user);
|
||||
if (user_sentinel == NULL) {
|
||||
return NSERROR_NOMEM;
|
||||
}
|
||||
|
||||
error = llcache_handle_clone(c->llcache, &(nc->llcache));
|
||||
if (error != NSERROR_OK) {
|
||||
return error;
|
||||
@ -1165,6 +1171,8 @@ nserror content__clone(const struct content *c, struct content *nc)
|
||||
}
|
||||
|
||||
nc->active = c->active;
|
||||
|
||||
nc->user_list = user_sentinel;
|
||||
|
||||
memcpy(&(nc->status_message), &(c->status_message), 120);
|
||||
memcpy(&(nc->sub_status), &(c->sub_status), 80);
|
||||
|
Loading…
Reference in New Issue
Block a user