mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-15 05:33:58 -04: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
|
void
|
||||||
sixel_destroy(struct sixel *sixel)
|
sixel_destroy(struct sixel *sixel)
|
||||||
{
|
{
|
||||||
pixman_image_unref(sixel->pix);
|
if (sixel->pix != NULL)
|
||||||
free(sixel->data);
|
pixman_image_unref(sixel->pix);
|
||||||
|
|
||||||
|
free(sixel->data);
|
||||||
sixel->pix = NULL;
|
sixel->pix = NULL;
|
||||||
sixel->data = NULL;
|
sixel->data = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue