From b5738ed1c4057aec7d904e6a4ada4b13052c751a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Capucho?= Date: Mon, 22 Mar 2021 12:45:03 +0000 Subject: [PATCH] Fix panic on zero sized scissor --- voxygen/src/ui/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/voxygen/src/ui/mod.rs b/voxygen/src/ui/mod.rs index 8e62428357..6015c957a5 100644 --- a/voxygen/src/ui/mod.rs +++ b/voxygen/src/ui/mod.rs @@ -667,7 +667,11 @@ impl Ui { if intersection.is_valid() { intersection } else { - Aabr::new_empty(Vec2::zero()) + // TODO: What should we return here + // We used to return a zero sized aabr but it's invalid to + // use a zero sized scissor so for now we just don't change + // the scissor. + current_scissor } }; if new_scissor != current_scissor {