Mercurial > hg > dmlib
changeset 2019:e809e323fdde
Check for NULL pointer.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 25 Oct 2018 17:45:38 +0300 |
parents | 1c45b2fb471d |
children | 57a2527ff63d |
files | tools/libgfx.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/libgfx.c Thu Sep 06 13:02:14 2018 +0300 +++ b/tools/libgfx.c Thu Oct 25 17:45:38 2018 +0300 @@ -1867,7 +1867,7 @@ } // Check if we should have a palette - if ((*pimg)->format == DM_COLFMT_PALETTE) + if (*pimg != NULL && (*pimg)->format == DM_COLFMT_PALETTE) { // Check that we DO have a palette .. if (iff.pal == NULL || iff.ncolors == 0)