aboutsummaryrefslogtreecommitdiff
path: root/sixel.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-07-18 15:57:11 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-07-18 15:57:11 +0000
commit4d82e048606d325771fbfcd930060532aab4c940 (patch)
tree568a446c4e669d508fe0cc4fae3847e34b5f1c9f /sixel.c
parentmeson/pkgbuild: bump version to 1.8.1 (diff)
parentchangelog: remove entries that are no longer relevant (diff)
Merge branch 'master' into releases/1.8
Diffstat (limited to 'sixel.c')
-rw-r--r--sixel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sixel.c b/sixel.c
index 86878978..18a9c146 100644
--- a/sixel.c
+++ b/sixel.c
@@ -88,9 +88,10 @@ sixel_init(struct terminal *term, int p1, int p2, int p3)
void
sixel_destroy(struct sixel *sixel)
{
- pixman_image_unref(sixel->pix);
- free(sixel->data);
+ if (sixel->pix != NULL)
+ pixman_image_unref(sixel->pix);
+ free(sixel->data);
sixel->pix = NULL;
sixel->data = NULL;
}