]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
gconfig: fix null pointer warning
authorLi Zefan <lizf@cn.fujitsu.com>
Fri, 7 May 2010 05:57:49 +0000 (13:57 +0800)
committerMichal Marek <mmarek@suse.cz>
Wed, 2 Jun 2010 13:10:33 +0000 (15:10 +0200)
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>
scripts/kconfig/gconf.c

index 1b1832943d7a20ccfec228344ac56431ccc505c2..d66988265f899b47a1dbf75767eb3330ec556d26 100644 (file)
@@ -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) {
@@ -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));