changeset 897:9541ea963e75

Add some error handling.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 23 Feb 2015 15:59:14 +0200
parents 90a879277ca2
children 448eaa7239f0
files tools/gfxconv.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tools/gfxconv.c	Mon Feb 23 15:44:33 2015 +0200
+++ b/tools/gfxconv.c	Mon Feb 23 15:59:14 2015 +0200
@@ -1612,8 +1612,13 @@
                 cfmt->name, cfmt->type, cfmt->fext);
         }
         
-        if (res == 0)
+        if (res == DMERR_OK)
             optInFormat = FFMT_BITMAP;
+        else
+        {
+            dmError("Could not decode input image.\n");
+            exit(3);
+        }
     }
 
     if (optInFormat == FFMT_AUTO || optInFormat == FFMT_IMAGE)