diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2010-05-07 01:57:49 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-06-02 09:10:33 -0400 |
commit | c10d03caf303d91da07c7f093a4822453c13f9b1 (patch) | |
tree | ca71ab60ab3e920f6252874dc94940197c22e7ed /scripts/kconfig | |
parent | e0bb7fe2d7e6d7cfa6135fa9ca5634343fff63b5 (diff) |
gconfig: fix null pointer warning
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>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r-- | scripts/kconfig/gconf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 1b1832943d7a..d66988265f89 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c | |||
@@ -1343,7 +1343,8 @@ static void update_tree(struct menu *src, GtkTreeIter * dst) | |||
1343 | #endif | 1343 | #endif |
1344 | 1344 | ||
1345 | if ((opt_mode == OPT_NORMAL && !menu_is_visible(child1)) || | 1345 | if ((opt_mode == OPT_NORMAL && !menu_is_visible(child1)) || |
1346 | (opt_mode == OPT_PROMPT && !menu_has_prompt(child1))) { | 1346 | (opt_mode == OPT_PROMPT && !menu_has_prompt(child1)) || |
1347 | (opt_mode == OPT_ALL && !menu_get_prompt(child1))) { | ||
1347 | 1348 | ||
1348 | /* remove node */ | 1349 | /* remove node */ |
1349 | if (gtktree_iter_find_node(dst, menu1) != NULL) { | 1350 | if (gtktree_iter_find_node(dst, menu1) != NULL) { |
@@ -1425,7 +1426,7 @@ static void display_tree(struct menu *menu) | |||
1425 | 1426 | ||
1426 | if ((opt_mode == OPT_NORMAL && menu_is_visible(child)) || | 1427 | if ((opt_mode == OPT_NORMAL && menu_is_visible(child)) || |
1427 | (opt_mode == OPT_PROMPT && menu_has_prompt(child)) || | 1428 | (opt_mode == OPT_PROMPT && menu_has_prompt(child)) || |
1428 | (opt_mode == OPT_ALL)) | 1429 | (opt_mode == OPT_ALL && menu_get_prompt(child))) |
1429 | place_node(child, fill_row(child)); | 1430 | place_node(child, fill_row(child)); |
1430 | #ifdef DEBUG | 1431 | #ifdef DEBUG |
1431 | printf("%*c%s: ", indent, ' ', menu_get_prompt(child)); | 1432 | printf("%*c%s: ", indent, ' ', menu_get_prompt(child)); |