diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-07-18 14:30:42 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-07-18 14:30:42 +0000 |
| commit | f65e062ce4defaa647b43927e462eaf2d683942b (patch) | |
| tree | a0611ca21f4d808e26b401d60f3e2892a694f53d /sixel.c | |
| parent | Merge branch 'crash-when-selection-is-in-scrollback-and-scrollback-is-erased' (diff) | |
sixel: destroy(): don’t unref a NULL pixman image
Diffstat (limited to 'sixel.c')
| -rw-r--r-- | sixel.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |
