aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-08-23 20:32:52 +0200
committerAlexander Orzechowski <alex@ozal.ski>2023-08-24 03:54:36 +0000
commit7bf6c1fc6c824bb2e031d464000ae41c86c459e5 (patch)
treea1b73a5d95cc31949f50537b16aefeffab551bc2 /render
parent4565b074845596743124a1c4188a9bb3548e8b05 (diff)
render/pass: ensure rect has positive size
Ported from wlr_render_rect().
Diffstat (limited to 'render')
-rw-r--r--render/pass.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/render/pass.c b/render/pass.c
index 6545bbfd..0fa31556 100644
--- a/render/pass.c
+++ b/render/pass.c
@@ -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;
}