# HG changeset patch # User Matti Hamalainen # Date 1526258347 -10800 # Node ID a076c9d9b32115759849f42394360f1f4702486c # Parent f1b279ba47a84a4fa2c7f1aa0b0c87f17aaad05e Improve error handling. diff -r f1b279ba47a8 -r a076c9d9b321 tools/gfxconv.c --- a/tools/gfxconv.c Mon May 14 02:38:24 2018 +0300 +++ b/tools/gfxconv.c Mon May 14 03:39:07 2018 +0300 @@ -1057,10 +1057,15 @@ int res = DMERR_OK; DMGrowBuf buf; + dmGrowBufInit(&buf); + // Encode to target format dmMsg(1, "Encoding C64 bitmap data to format '%s'\n", fmt->name); if ((res = dmC64EncodeBMP(&buf, image, fmt)) != DMERR_OK) + { + dmErrorMsg("Error encoding bitmap data: %s\n", dmErrorStr(res)); goto error; + } // And output the file dmMsg(1, "Writing output file '%s'\n", filename);