Protect against NaN in hit-test code (#6851)

* Closes <https://github.com/emilk/egui/issues/6756>
* [x] I have followed the instructions in the PR template
This commit is contained in:
Bennet Bleßmann
2025-04-24 14:50:34 +02:00
committed by GitHub
parent 69b9f0eede
commit 6f910f60e9
+1 -1
View File
@@ -65,7 +65,7 @@ pub fn hit_test(
.filter(|layer| layer.order.allow_interaction())
.flat_map(|&layer_id| widgets.get_layer(layer_id))
.filter(|&w| {
if w.interact_rect.is_negative() {
if w.interact_rect.is_negative() || w.interact_rect.any_nan() {
return false;
}