mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
box-drawing: change_buffer_format: abort on pixman failure
This commit is contained in:
parent
99a3b034c3
commit
9264d6695c
1 changed files with 6 additions and 0 deletions
|
|
@ -40,6 +40,12 @@ change_buffer_format(struct buf *buf, pixman_format_code_t new_format)
|
|||
pixman_image_t *new_pix = pixman_image_create_bits_no_clear(
|
||||
new_format, buf->width, buf->height, (uint32_t *)new_data, stride);
|
||||
|
||||
if (new_pix == NULL) {
|
||||
errno = ENOMEM;
|
||||
perror(__func__);
|
||||
abort();
|
||||
}
|
||||
|
||||
pixman_image_unref(buf->pix);
|
||||
free(buf->data);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue