diff options
Diffstat (limited to 'screen-write.c')
-rw-r--r-- | screen-write.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/screen-write.c b/screen-write.c index 6892d041..a732f093 100644 --- a/screen-write.c +++ b/screen-write.c @@ -2283,6 +2283,10 @@ screen_write_sixelimage(struct screen_write_ctx *ctx, struct sixel_image *si, new = sixel_scale(si, 0, 0, 0, y - sy, sx, sy, 1); sixel_free(si); si = new; + + /* Bail out if the image cannot be scaled. */ + if (si == NULL) + return; sixel_size_in_cells(si, &x, &y); } |