box-drawing: change_buffer_format: abort on pixman failure

This commit is contained in:
Daniel Eklöf 2021-05-05 22:08:14 +02:00
parent 99a3b034c3
commit 9264d6695c
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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);