r4274 mikeL - /branches/mikeL/netsurf/desktop/selection.c

netsurf at semichrome.net netsurf at semichrome.net
Fri Jun 6 17:15:05 BST 2008


Author: mikeL
Date: Fri Jun  6 11:15:05 2008
New Revision: 4274

URL: http://source.netsurf-browser.org?rev=4274&view=rev
Log:
Added case to test if box->parent exists to avoid crash on selection

Modified:
    branches/mikeL/netsurf/desktop/selection.c

Modified: branches/mikeL/netsurf/desktop/selection.c
URL: http://source.netsurf-browser.org/branches/mikeL/netsurf/desktop/selection.c?rev=4274&r1=4273&r2=4274&view=diff
==============================================================================
--- branches/mikeL/netsurf/desktop/selection.c (original)
+++ branches/mikeL/netsurf/desktop/selection.c Fri Jun  6 11:15:05 2008
@@ -446,7 +446,7 @@
 	assert(box);
 
 	/* If selection starts inside marker */
-	if (box->parent->list_marker == box && !do_marker) {
+	if (box->parent && box->parent->list_marker == box && !do_marker) {
 		/* set box to main list element */
 		box = box->parent;
 	}




More information about the netsurf-commits mailing list