aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);