Ensure selection context is zero-initialised. This may well be the root cause of the random selection crashes people have been seeing.

svn path=/trunk/netsurf/; revision=9679
This commit is contained in:
John Mark Bell 2009-11-22 13:20:39 +00:00
parent bc4abe9087
commit 9ca1622183

View File

@ -91,7 +91,7 @@ static struct box *get_box(struct box *b, unsigned offset, size_t *pidx);
struct selection *selection_create(struct browser_window *bw) struct selection *selection_create(struct browser_window *bw)
{ {
struct selection *s = malloc(sizeof(struct selection)); struct selection *s = calloc(1, sizeof(struct selection));
if (s) { if (s) {
s->bw = bw; s->bw = bw;
s->root = NULL; s->root = NULL;