diff options
Diffstat (limited to '')
-rw-r--r-- | widget_gpo.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/widget_gpo.c b/widget_gpo.c index 74b8f61..4b92571 100644 --- a/widget_gpo.c +++ b/widget_gpo.c @@ -89,9 +89,14 @@ int widget_gpo_init(WIDGET * Self) memset(GPO, 0, sizeof(WIDGET_GPO)); /* load properties */ - property_load(section, "expression", "0", &GPO->expression); + property_load(section, "expression", NULL, &GPO->expression); property_load(section, "update", "1000", &GPO->update); + /* sanity checks */ + if (!property_valid(&GPO->expression)) { + error("Warning: widget %s has no expression", section); + } + free(section); Self->data = GPO; |