diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-11-22 13:20:39 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-11-22 13:20:39 +0000 |
commit | 9ca162218376088ea59020327c22e4ac9a099ea1 (patch) | |
tree | e4a2a11c911bc2dce812049df9e8887cfcaf90c4 /desktop/selection.c | |
parent | bc4abe90878b5550d1461287d5a9f060565c30b9 (diff) | |
download | netsurf-9ca162218376088ea59020327c22e4ac9a099ea1.tar.gz netsurf-9ca162218376088ea59020327c22e4ac9a099ea1.tar.bz2 |
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
Diffstat (limited to 'desktop/selection.c')
-rw-r--r-- | desktop/selection.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop/selection.c b/desktop/selection.c index 623caf414..93f5cc1a3 100644 --- a/desktop/selection.c +++ b/desktop/selection.c @@ -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 *s = malloc(sizeof(struct selection)); + struct selection *s = calloc(1, sizeof(struct selection)); if (s) { s->bw = bw; s->root = NULL; |