mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Fix panic when accessing a global from init that's not used otherwise
Make sure to visit the named references in the init code, when collecting globals. Fixes #2312
This commit is contained in:
parent
fb06cd8d51
commit
f4c30ce46e
2 changed files with 8 additions and 0 deletions
|
@ -2056,6 +2056,11 @@ pub fn visit_all_named_references(
|
|||
compo
|
||||
},
|
||||
);
|
||||
component
|
||||
.init_code
|
||||
.borrow_mut()
|
||||
.iter_mut()
|
||||
.for_each(|expr| visit_named_references_in_expression(expr, vis));
|
||||
}
|
||||
|
||||
/// Visit all expression in this component and sub components
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue