Skip to content

Commit

Permalink
gconfig: fix null pointer warning
Browse files Browse the repository at this point in the history
In gconfig if you enable "Show all options", you'll see some "(null)"
config options, and clicking those options triggers a warning:

(gconf:9368): Gtk-CRITICAL **: gtk_text_buffer_insert_with_tags: assertion `text != NULL' failed

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
Li Zefan authored and Michal Marek committed Jun 2, 2010
1 parent e0bb7fe commit c10d03c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/kconfig/gconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,8 @@ static void update_tree(struct menu *src, GtkTreeIter * dst)
#endif

if ((opt_mode == OPT_NORMAL && !menu_is_visible(child1)) ||
(opt_mode == OPT_PROMPT && !menu_has_prompt(child1))) {
(opt_mode == OPT_PROMPT && !menu_has_prompt(child1)) ||
(opt_mode == OPT_ALL && !menu_get_prompt(child1))) {

/* remove node */
if (gtktree_iter_find_node(dst, menu1) != NULL) {
Expand Down Expand Up @@ -1425,7 +1426,7 @@ static void display_tree(struct menu *menu)

if ((opt_mode == OPT_NORMAL && menu_is_visible(child)) ||
(opt_mode == OPT_PROMPT && menu_has_prompt(child)) ||
(opt_mode == OPT_ALL))
(opt_mode == OPT_ALL && menu_get_prompt(child)))
place_node(child, fill_row(child));
#ifdef DEBUG
printf("%*c%s: ", indent, ' ', menu_get_prompt(child));
Expand Down

0 comments on commit c10d03c

Please sign in to comment.