mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix panic on zero sized scissor
This commit is contained in:
parent
ca91cf3ca3
commit
b5738ed1c4
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user