]> Dogcows Code - chaz/openbox/commitdiff
add a check for adding the same exact def'n twice
authorDana Jansens <danakj@orodu.net>
Sat, 22 Mar 2003 21:58:26 +0000 (21:58 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 22 Mar 2003 21:58:26 +0000 (21:58 +0000)
openbox/config.c

index 03fac801d5882135051baae91930dec0fda7975b..adb18359ac6623873c7e5dbf17ed3061052a3d0a 100644 (file)
@@ -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);
This page took 0.024912 seconds and 4 git commands to generate.