From ba577602a434c78260e1c0582cdc18618c59f2fa Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 3 Jul 2025 13:40:02 +0200 Subject: [PATCH] Fix crash when using infinite widgets (#7296) * Closes https://github.com/emilk/egui/issues/7100 --- crates/egui/src/hit_test.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/egui/src/hit_test.rs b/crates/egui/src/hit_test.rs index f253a1df..1361c1c4 100644 --- a/crates/egui/src/hit_test.rs +++ b/crates/egui/src/hit_test.rs @@ -91,6 +91,8 @@ pub fn hit_test( } } + close.retain(|rect| !rect.interact_rect.any_nan()); // Protect against bad input and transforms + // When using layer transforms it is common to stack layers close to each other. // For instance, you may have a resize-separator on a panel, with two // transform-layers on either side.