module/xkb: initialize layouts to zero

Fixes a crash when content() is called before we've initialized the
layouts.
This commit is contained in:
Daniel Eklöf 2018-12-18 19:49:05 +01:00
parent 47f5c5d655
commit 6db41b7803

View file

@ -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;