aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-05-05 20:08:14 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-05-17 15:58:30 +0000
commit9264d6695c1e8b4e4bd3d338026d83836ca3d014 (patch)
tree64fe67d5437944cc7dda2b6b88257fe070f1bda7
parentbox-drawing: apply antialiasing to LIGHT ARCs (diff)
box-drawing: change_buffer_format: abort on pixman failure
-rw-r--r--box-drawing.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/box-drawing.c b/box-drawing.c
index 05fad40b..25021e31 100644
--- a/box-drawing.c
+++ b/box-drawing.c
@@ -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);