From d86301d7139c86c4fe92e6afb0b9586c120f6771 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Fri, 21 Mar 2025 10:36:28 +0800 Subject: [PATCH] fix: crash when clipbox width or height less than zero --- maomao.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maomao.c b/maomao.c index f4fefcdb..abed57e3 100644 --- a/maomao.c +++ b/maomao.c @@ -1025,6 +1025,9 @@ void apply_border(Client *c, struct wlr_box clip_box, int offsetx, if (c->iskilling || !client_surface(c)->mapped) return; + if(clip_box.width < 0 || clip_box.height < 0) + return; + wlr_scene_node_set_position(&c->scene_surface->node, c->bw, c->bw); wlr_scene_rect_set_size(c->border[0], clip_box.width, c->bw); wlr_scene_rect_set_size(c->border[1], clip_box.width, c->bw);