mirror of
https://github.com/labwc/labwc.git
synced 2026-03-19 05:33:53 -04:00
scaled-scene-buffer: guard against negative sizes
This commit is contained in:
parent
6305cc0f78
commit
849fd7a96f
4 changed files with 13 additions and 2 deletions
|
|
@ -79,6 +79,9 @@ struct scaled_icon_buffer *
|
|||
scaled_icon_buffer_create(struct wlr_scene_tree *parent, struct server *server,
|
||||
int width, int height)
|
||||
{
|
||||
assert(parent);
|
||||
assert(width >= 0 && height >= 0);
|
||||
|
||||
struct scaled_scene_buffer *scaled_buffer = scaled_scene_buffer_create(
|
||||
parent, &impl, /* drop_buffer */ true);
|
||||
struct scaled_icon_buffer *self = znew(*self);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue