Author: jmb
Date: Sun Nov 22 07:20:39 2009
New Revision: 9679
URL:
http://source.netsurf-browser.org?rev=9679&view=rev
Log:
Ensure selection context is zero-initialised. This may well be the root cause of the
random selection crashes people have been seeing.
Modified:
trunk/netsurf/desktop/selection.c
Modified: trunk/netsurf/desktop/selection.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/desktop/selection.c?rev=9...
==============================================================================
--- trunk/netsurf/desktop/selection.c (original)
+++ trunk/netsurf/desktop/selection.c Sun Nov 22 07:20:39 2009
@@ -91,7 +91,7 @@
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;