From 7bf6c1fc6c824bb2e031d464000ae41c86c459e5 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 23 Aug 2023 20:32:52 +0200 Subject: render/pass: ensure rect has positive size Ported from wlr_render_rect(). --- render/pass.c | 1 + 1 file changed, 1 insertion(+) (limited to 'render') 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; } -- cgit v1.2.3