changeset 3329:70149c3555f4 trunk

For interest of transparency, make associating NULL equivilant to deleting the field.
author William Pitcock <nenolod@atheme-project.org>
date Sat, 11 Aug 2007 05:44:21 -0500
parents 6dbb73b8e28c
children 8745ffb73f49
files src/audacious/tuple.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/tuple.c	Fri Aug 10 20:28:30 2007 -0500
+++ b/src/audacious/tuple.c	Sat Aug 11 05:44:21 2007 -0500
@@ -123,11 +123,13 @@
 
     g_return_val_if_fail(tuple != NULL, FALSE);
     g_return_val_if_fail(field != NULL, FALSE);
-    g_return_val_if_fail(string != NULL, FALSE);
 
     if (mowgli_dictionary_find(tuple->dict, field))
         tuple_disassociate(tuple, field);
 
+    if (string == NULL)
+        return TRUE;
+
     value = mowgli_heap_alloc(tuple_value_heap);
     value->type = TUPLE_STRING;
     value->value.string = g_strdup(string);