[evolution-patches] 42647: crash in find next



Some null checks.

Mike
Index: gal/e-table/ChangeLog
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/ChangeLog,v
retrieving revision 1.894
diff -u -p -r1.894 ChangeLog
--- gal/e-table/ChangeLog	9 May 2003 17:14:17 -0000	1.894
+++ gal/e-table/ChangeLog	9 May 2003 21:18:20 -0000
@@ -1,5 +1,10 @@
 2003-05-09  Mike Kestner  <mkestner ximian com>
 
+	* e-tree.c (find_next_in_range): add null check for paths
+	(find_prev_in_range): add null check for paths
+
+2003-05-09  Mike Kestner  <mkestner ximian com>
+
 	* e-table-item.c (eti_cursor_change): don't return on col == -1. 
 	* e-tree.c (tree_canvas_size_allocate): update the adjustment 
 	to center the cursor.
Index: gal/e-table/e-tree.c
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/e-tree.c,v
retrieving revision 1.98
diff -u -p -r1.98 e-tree.c
--- gal/e-table/e-tree.c	9 May 2003 17:14:17 -0000	1.98
+++ gal/e-table/e-tree.c	9 May 2003 21:18:22 -0000
@@ -2049,7 +2049,7 @@ find_next_in_range (ETree *et, gint star
 
 	for (row = start; row <= end; row++) {
 		path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
-		if (func (et->priv->model, path, data))
+		if (path && func (et->priv->model, path, data))
 			return path;
 	}
 
@@ -2064,7 +2064,7 @@ find_prev_in_range (ETree *et, gint star
 
 	for (row = start; row >= end; row--) {
 		path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
-		if (func (et->priv->model, path, data))
+		if (path && func (et->priv->model, path, data))
 			return path;
 	}
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]