Commit c10d03ca authored by Li Zefan's avatar Li Zefan Committed by Michal Marek

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: default avatarLi Zefan <lizf@cn.fujitsu.com>
Acked-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent e0bb7fe2
...@@ -1343,7 +1343,8 @@ static void update_tree(struct menu *src, GtkTreeIter * dst) ...@@ -1343,7 +1343,8 @@ static void update_tree(struct menu *src, GtkTreeIter * dst)
#endif #endif
if ((opt_mode == OPT_NORMAL && !menu_is_visible(child1)) || 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 */ /* remove node */
if (gtktree_iter_find_node(dst, menu1) != NULL) { if (gtktree_iter_find_node(dst, menu1) != NULL) {
...@@ -1425,7 +1426,7 @@ static void display_tree(struct menu *menu) ...@@ -1425,7 +1426,7 @@ static void display_tree(struct menu *menu)
if ((opt_mode == OPT_NORMAL && menu_is_visible(child)) || if ((opt_mode == OPT_NORMAL && menu_is_visible(child)) ||
(opt_mode == OPT_PROMPT && menu_has_prompt(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)); place_node(child, fill_row(child));
#ifdef DEBUG #ifdef DEBUG
printf("%*c%s: ", indent, ' ', menu_get_prompt(child)); printf("%*c%s: ", indent, ' ', menu_get_prompt(child));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment