mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
sixel: destroy(): don’t unref a NULL pixman image
This commit is contained in:
parent
a577496f8f
commit
f65e062ce4
1 changed files with 3 additions and 2 deletions
5
sixel.c
5
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue