# HG changeset patch # User Matti Hamalainen # Date 1559499695 -10800 # Node ID 0905b2a87cbd88b76e182e0f8cf53cea825db7c3 # Parent 0bb1d0ad178ff26321a19555a60ce82414a55a0d Write ARAW palette only if it exists. diff -r 0bb1d0ad178f -r 0905b2a87cbd tools/libgfx.c --- 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"