mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-22 09:59:48 +01:00
render: Assert that texture dimensions are > 0
This commit is contained in:
parent
78b94a570c
commit
572b5910bb
1 changed files with 4 additions and 0 deletions
|
@ -22,6 +22,10 @@ void wlr_texture_destroy(struct wlr_texture *texture) {
|
|||
struct wlr_texture *wlr_texture_from_pixels(struct wlr_renderer *renderer,
|
||||
uint32_t fmt, uint32_t stride, uint32_t width, uint32_t height,
|
||||
const void *data) {
|
||||
assert(width > 0);
|
||||
assert(height > 0);
|
||||
assert(stride >= width);
|
||||
assert(data);
|
||||
return renderer->impl->texture_from_pixels(renderer, fmt, stride, width,
|
||||
height, data);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue