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:
parent
69b9f0eede
commit
6f910f60e9
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue