From 6db41b78035cf6dc96a49b25edb00c97e44d4c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 18 Dec 2018 19:49:05 +0100 Subject: [PATCH] module/xkb: initialize layouts to zero Fixes a crash when content() is called before we've initialized the layouts. --- modules/xkb/xkb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/xkb/xkb.c b/modules/xkb/xkb.c index 904fcc8..8364ecf 100644 --- a/modules/xkb/xkb.c +++ b/modules/xkb/xkb.c @@ -449,6 +449,9 @@ module_xkb(struct particle *label) { struct private *m = malloc(sizeof(*m)); m->label = label; + m->current = 0; + m->layouts.count = 0; + m->layouts.layouts = NULL; struct module *mod = malloc(sizeof(*mod)); mod->bar = NULL;