diff tools/gfxconv.c @ 897:9541ea963e75

Add some error handling.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 23 Feb 2015 15:59:14 +0200
parents fc272f5f2d15
children c6c480e8e1c8
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)