From: Dana Jansens Date: Sat, 22 Mar 2003 21:58:26 +0000 (+0000) Subject: add a check for adding the same exact def'n twice X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=8b02e6b51ae81b264297057edd33d7594480ca5d;p=chaz%2Fopenbox add a check for adding the same exact def'n twice --- diff --git a/openbox/config.c b/openbox/config.c index 03fac801..adb18359 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -195,8 +195,10 @@ gboolean config_def_add_value(ConfigDefEntry *entry, char *value) 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);