bar: deal with NULL exposables

Allow modules to return NULL in begin_expose()
This commit is contained in:
Daniel Eklöf 2020-10-30 16:25:12 +01:00
parent 2bb70c6fcb
commit 4d05947985
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 14 additions and 4 deletions

View file

@ -23,6 +23,7 @@ struct exposable *
module_begin_expose(struct module *mod)
{
struct exposable *e = mod->content(mod);
e->begin_expose(e);
if (e != NULL)
e->begin_expose(e);
return e;
}