Mercurial > hg > dmlib
changeset 2145:0905b2a87cbd
Write ARAW palette only if it exists.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 02 Jun 2019 21:21:35 +0300 |
parents | 0bb1d0ad178f |
children | 26f21e487fe2 |
files | tools/libgfx.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/libgfx.c Sun Jun 02 21:08:23 2019 +0300 +++ b/tools/libgfx.c Sun Jun 02 21:21:35 2019 +0300 @@ -585,7 +585,9 @@ prefix, spec->nplanes) < 0) return dmferror(fp); - if (spec->fmtid == DM_IMGFMT_ARAW) + if (spec->fmtid == DM_IMGFMT_ARAW && + img->format == DM_COLFMT_PALETTE && + img->pal != NULL) { if (dmfprintf(fp, "%s_ncolors: dw.w %d\n"