mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
render/pixman: check format is supported in create_buffer
This commit is contained in:
parent
24fde77c62
commit
3a04fb4560
1 changed files with 6 additions and 1 deletions
|
@ -91,7 +91,12 @@ static struct wlr_pixman_buffer *create_buffer(
|
|||
goto error_buffer;
|
||||
}
|
||||
|
||||
uint32_t format = get_pixman_format_from_drm(drm_format);
|
||||
pixman_format_code_t format = get_pixman_format_from_drm(drm_format);
|
||||
if (format == 0) {
|
||||
wlr_log(WLR_ERROR, "Unsupported pixman drm format 0x%"PRIX32,
|
||||
drm_format);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
buffer->image = pixman_image_create_bits(format, wlr_buffer->width,
|
||||
wlr_buffer->height, data, stride);
|
||||
|
|
Loading…
Reference in a new issue