mirror of
https://github.com/storytold/egui.git
synced 2026-11-22 18:41:52 +01:00
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:
1 parent
69b9f0eede
commit
6f910f60e9
1 file changed
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user