Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376703
b: refs/heads/master
c: e983b7b
h: refs/heads/master
i:
  376701: e1b9441
  376699: e541597
  376695: 6d193f5
  376687: b54deee
  376671: 6ad4c4c
  376639: 3f766cd
  376575: e7a9d99
v: v3
  • Loading branch information
Dirk Gouders authored and Yann E. MORIN committed May 29, 2013
1 parent b4f52a7 commit 5e17a50
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 063f4661fde8c03c4c03f8a205071a52691c152e
refs/heads/master: e983b7b17ad1a978e954e6aaa62cf12bfc747883
15 changes: 14 additions & 1 deletion trunk/scripts/kconfig/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,24 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
struct menu *menu = current_entry;

while ((menu = menu->parent) != NULL) {
struct expr *dup_expr;

if (!menu->visibility)
continue;
/*
* Do not add a reference to the
* menu's visibility expression but
* use a copy of it. Otherwise the
* expression reduction functions
* will modify expressions that have
* multiple references which can
* cause unwanted side effects.
*/
dup_expr = expr_copy(menu->visibility);

prop->visible.expr
= expr_alloc_and(prop->visible.expr,
menu->visibility);
dup_expr);
}
}

Expand Down

0 comments on commit 5e17a50

Please sign in to comment.