summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-11-08 15:11:35 (EST)
committer Patrick McDermott <pj@pehjota.net>2017-11-08 15:11:35 (EST)
commitea0c09cb0e613e2682d3c9a976db240eb25d94fa (patch)
tree8d590e561fe1edc129cc7ea7728b17307cc02c74
parent5b8646ffce5287f56f68c28bf87a219081131528 (diff)
downloadmarquee-ea0c09cb0e613e2682d3c9a976db240eb25d94fa.zip
marquee-ea0c09cb0e613e2682d3c9a976db240eb25d94fa.tar.gz
marquee-ea0c09cb0e613e2682d3c9a976db240eb25d94fa.tar.bz2
mq_svg_is_color_valid(): Avoid NULL pointer dereference
This shouldn't happen once the no-default case is handled and profiles that are in use but removed are re-inserted, but it's good to avoid a potential creash anyway.
-rw-r--r--src/utils/svg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/svg.c b/src/utils/svg.c
index b52a4f6..dd746f9 100644
--- a/src/utils/svg.c
+++ b/src/utils/svg.c
@@ -30,7 +30,7 @@ mq_svg_is_color_valid(const gchar *color)
{
gsize i;
- if (color[0] != '#') {
+ if (!color || color[0] != '#') {
return FALSE;
}
for (i = 1; i <= 6; ++i) {