changeset 1930:c048da352279

Default to D64_ILACE_RES if the given buffer is NULL in fmtDrazLaceGetLaceType().
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 28 Jun 2018 14:49:52 +0300
parents b49814dd8469
children 410679d2fe8a
files tools/lib64fmts.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64fmts.c	Thu Jun 28 14:48:50 2018 +0300
+++ b/tools/lib64fmts.c	Thu Jun 28 14:49:52 2018 +0300
@@ -190,7 +190,12 @@
     const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
 {
     (void) fmt;
-    img->laceType = buf->data[op->offs] ? D64_ILACE_RES : D64_ILACE_COLOR;
+
+    if (buf != NULL)
+        img->laceType = buf->data[op->offs] ? D64_ILACE_RES : D64_ILACE_COLOR;
+    else
+        img->laceType = D64_ILACE_RES;
+
     return TRUE;
 }