mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 04:45:58 +01:00
render/pass: ensure rect has positive size
Ported from wlr_render_rect().
This commit is contained in:
parent
4565b07484
commit
7bf6c1fc6c
1 changed files with 1 additions and 0 deletions
|
@ -40,6 +40,7 @@ void wlr_render_pass_add_texture(struct wlr_render_pass *render_pass,
|
|||
|
||||
void wlr_render_pass_add_rect(struct wlr_render_pass *render_pass,
|
||||
const struct wlr_render_rect_options *options) {
|
||||
assert(options->box.width >= 0 && options->box.height >= 0);
|
||||
if (wlr_box_empty(&options->box)) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue