From 8b02e6b51ae81b264297057edd33d7594480ca5d Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 22 Mar 2003 21:58:26 +0000 Subject: [PATCH] add a check for adding the same exact def'n twice --- openbox/config.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.45.2