Mercurial > hg > dmlib
changeset 2450:dc92cf744ad9
Check that the image format detected by dmImageProbeGeneric() has read() function defined.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 15 Apr 2020 13:31:08 +0300 |
parents | ff639208aae6 |
children | 2e2a6c344371 |
files | tools/gfxconv.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/gfxconv.c Wed Apr 15 13:30:16 2020 +0300 +++ b/tools/gfxconv.c Wed Apr 15 13:31:08 2020 +0300 @@ -2151,7 +2151,8 @@ const DMImageFormat *ifmt = NULL; int index; dmMsg(4, "Trying to probe image formats.\n"); - if (dmImageProbeGeneric(dataBuf, dataSize, &ifmt, &index) > 0) + if (dmImageProbeGeneric(dataBuf, dataSize, &ifmt, &index) > 0 && + ifmt->read != NULL) { optInType = FFMT_IMAGE; optInFormat = index;