1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Fix small memory leak

Now windows that do not exist will not be able to stay in redraw requests
This commit is contained in:
Konkitoman
2023-07-25 09:48:12 +03:00
parent 199d4e53cd
commit 86068c6590
2 changed files with 20 additions and 4 deletions

View File

@@ -1156,7 +1156,7 @@ mod glow_integration {
} else {
repaint_after
.into_iter()
.map(|(id, time)| {
.flat_map(|(id, time)| {
if time.is_zero() {
if let Some(id) = window_map.get(&id) {
Some(EventResult::RepaintNext(*id))
@@ -1181,7 +1181,6 @@ mod glow_integration {
None
}
})
.flatten()
.collect::<Vec<EventResult>>()
};