From 7ad8d3742182936e9c33d0cd65716bcf68e43987 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 13 Jul 2016 16:27:19 +0200 Subject: Print warninging when attemping to remove non-existing filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/output.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/output.c b/src/output.c index f3259e0..f323ff0 100644 --- a/src/output.c +++ b/src/output.c @@ -18,6 +18,7 @@ #include "output.h" #include "util.h" +#include #include #include @@ -273,7 +274,11 @@ static ssize_t remove_filter(struct output* out, struct filter* filter) break; if (i == out->table_size) - return (ssize_t)(out->table_size); + { + fprintf(stderr, "%s: ignoring attempt to removing non-existing filter on CRTC %s: %s", + argv0, out->name, filter->class); + return (ssize_t)(out->table_size); + } filter_destroy(out->table_filters + i); libgamma_gamma_ramps8_destroy(&(out->table_sums[i].u8)); -- cgit v1.2.3-70-g09d2