add a check for adding the same exact def'n twice
Dana Jansens danakj@orodu.net
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
openbox/config.c
→
openbox/config.c
@@ -195,8 +195,10 @@
gboolean config_def_set(ConfigDefEntry *entry) { gboolean ret = FALSE; + ConfigDefEntry *def; - if (g_datalist_get_data(&config_def, entry->name)) { + if ((entry = g_datalist_get_data(&config_def, entry->name))) { + g_assert(def != entry); /* adding it twice!? */ g_warning("Definition already set for config option '%s'. ", entry->name); config_def_free(entry);