Mercurial > hg > dmlib
comparison 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 |
comparison
equal
deleted
inserted
replaced
896:90a879277ca2 | 897:9541ea963e75 |
---|---|
1610 { | 1610 { |
1611 dmMsg(1,"Probed %s format image, type %d, %s\n", | 1611 dmMsg(1,"Probed %s format image, type %d, %s\n", |
1612 cfmt->name, cfmt->type, cfmt->fext); | 1612 cfmt->name, cfmt->type, cfmt->fext); |
1613 } | 1613 } |
1614 | 1614 |
1615 if (res == 0) | 1615 if (res == DMERR_OK) |
1616 optInFormat = FFMT_BITMAP; | 1616 optInFormat = FFMT_BITMAP; |
1617 else | |
1618 { | |
1619 dmError("Could not decode input image.\n"); | |
1620 exit(3); | |
1621 } | |
1617 } | 1622 } |
1618 | 1623 |
1619 if (optInFormat == FFMT_AUTO || optInFormat == FFMT_IMAGE) | 1624 if (optInFormat == FFMT_AUTO || optInFormat == FFMT_IMAGE) |
1620 { | 1625 { |
1621 DMImageFormat *ifmt = NULL; | 1626 DMImageFormat *ifmt = NULL; |