You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid a "RefCell already borrowed" error with WINIT_WINDOWS (#21338)
# Objective
Fixes#21319.
## Solution
In the "about_to_wait" state of Bevy's winit event loop, we borrow
WINIT_WINDOWS only to check the conditions for a redraw, and perform the
call after that check is concluded.
## Testing
Tested by confirming that the RefCell error no longer occurs in my
application. In my application, the error occurred when the
`bevy-egui-inspector` crate was used.
I do not know whether the original reporter of #21319 was also using
third-party Bevy plugins that might have caused the issue. It would be
good if they could check whether this change fixes it for them.
Tested on Windows 11, where the bug is known to occur. The code that was
changed is only included in Windows builds so there is little need to
test on other platforms.
---------
Co-authored-by: Alice Cecile <[email protected]>
Co-authored-by: Dimitrios Loukadakis <[email protected]>
0 commit comments