mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] gconfig segfaults & compile error fix
@ 2004-01-05 20:34 Romain Lievin
  0 siblings, 0 replies; only message in thread
From: Romain Lievin @ 2004-01-05 20:34 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Buddy Lucas, Roman Zippel

Hi,

this patch fix a segfault problem (Roman Zippel) as well as some compile warnings (Buddy Lucas).

Patch was against 2.6.0.

Thanks, Romain.
======================[ cut here ]=========================
diff -Naur linux-2.6.0/scripts/kconfig/gconf.c linux/scripts/kconfig/gconf.c
--- linux-2.6.0/scripts/kconfig/gconf.c	2003-12-18 03:59:41.000000000 +0100
+++ linux/scripts/kconfig/gconf.c	2003-12-24 15:31:06.000000000 +0100
@@ -1,7 +1,7 @@
 /* Hey EMACS -*- linux-c -*- */
 /*
  *
- * Copyright (C) 2002-2003 Romain Lievin <roms@lpg.ticalc.org>
+ * Copyright (C) 2002-2003 Romain Lievin <roms@tilp.info>
  * Released under the terms of the GNU GPL v2.0.
  *
  */
@@ -1047,6 +1047,8 @@
 		return FALSE;
 
 	gtk_tree_model_get_iter(model2, &iter, path);
+	if(!gtk_tree_store_iter_is_valid(model2, &iter))
+		return FALSE;
 	gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1);
 
 	col = column2index(column);
@@ -1172,7 +1174,7 @@
 
 	gtk_widget_realize(tree2_w);
 	gtk_tree_view_set_cursor(view, path, NULL, FALSE);
-	gtk_widget_grab_focus(GTK_TREE_VIEW(tree2_w));
+	gtk_widget_grab_focus(tree2_w);
 
 	return FALSE;
 }
@@ -1401,7 +1403,6 @@
 	struct symbol *sym;
 	struct property *prop;
 	struct menu *menu1, *menu2;
-	static GtkTreePath *path = NULL;
 
 	if (src == &rootmenu)
 		indent = 1;
@@ -1526,7 +1527,7 @@
 		if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) ||
 		    (view_mode == FULL_VIEW)
 		    || (view_mode == SPLIT_VIEW))*/
-		if ((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT) 
+		if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT)) 
 		|| (view_mode == FULL_VIEW) || (view_mode == SPLIT_VIEW)) {
 			indent++;
 			display_tree(child);

-- 
Romain Li�vin (roms):         <roms@tilp.info>
Web site:                     http://tilp.info
"Linux, y'a moins bien mais c'est plus cher !"







^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-01-05 20:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-05 20:34 [PATCH] gconfig segfaults & compile error fix Romain Lievin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®