diff options
Diffstat (limited to 'src/backend_libpng.c')
-rw-r--r-- | src/backend_libpng.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/backend_libpng.c b/src/backend_libpng.c index 323139e..2acc903 100644 --- a/src/backend_libpng.c +++ b/src/backend_libpng.c @@ -1,6 +1,8 @@ #include "backend_libpng.h" #include "backend.h" #include "source.h" + +#include <assert.h> #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -45,11 +47,7 @@ static struct imv_bitmap *to_imv_bitmap(int width, int height, void *bitmap) static void report_error(struct imv_source *src) { - if (!src->callback) { - fprintf(stderr, "imv_source(%s) has no callback configured. " - "Discarding error.\n", src->name); - return; - } + assert(src->callback); struct imv_source_message msg; msg.source = src; @@ -64,11 +62,7 @@ static void report_error(struct imv_source *src) static void send_bitmap(struct imv_source *src, void *bitmap) { - if (!src->callback) { - fprintf(stderr, "imv_source(%s) has no callback configured. " - "Discarding result.\n", src->name); - return; - } + assert(src->callback); struct imv_source_message msg; msg.source = src; |