Skip to content

Commit

Permalink
compiler: Keep ElementRc valid
Browse files Browse the repository at this point in the history
... instead of breaking it with calling `take()` in the contents of the Rc.

@ogofart spotted this, thanks!
  • Loading branch information
hunger committed Jun 19, 2024
1 parent 58148b4 commit 6445b1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/compiler/typeloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ impl Snapshotter {
r.is_root_component.set(component.is_root_component.get());
*r.embedded_file_resources.borrow_mut() = embedded_file_resources;

*r.root_element.borrow_mut() = root_element.take();
*r.root_element.borrow_mut() = root_element.clone();
*r.child_insertion_point.borrow_mut() = child_insertion_point;
*r.popup_windows.borrow_mut() = popup_windows;

Expand Down

0 comments on commit 6445b1a

Please sign in to comment.