From 8698144ac4190bad7d02b1f62bda14e9e75783d8 Mon Sep 17 00:00:00 2001 From: Twan van Laarhoven Date: Sun, 26 Apr 2020 17:40:22 +0200 Subject: [PATCH] Warn about parse errors in colors --- src/gfx/color.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gfx/color.cpp b/src/gfx/color.cpp index 2acf2558..1afe9fcf 100644 --- a/src/gfx/color.cpp +++ b/src/gfx/color.cpp @@ -13,7 +13,10 @@ template <> void Reader::handle(Color& col) { col = parse_color(getValue()); - if (!col.Ok()) col = Color(0,0,0,0); + if (!col.Ok()) { + col = Color(0,0,0,0); + warning(_("Not a valid color value")); + } } template <> void Writer::handle(const Color& col) {