changeset 23034:41b188686bdf

applied changes from 069f197178d158cdd308687095c14d49d8eee0ed through adc233c42c586b7fae877a688cd39532eaca23a0
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 19 Jun 2008 03:17:41 +0000
parents 6b2f8b7b6720
children 3f6ab2cbca5f
files libpurple/protocols/jabber/xdata.c
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/xdata.c	Thu Jun 19 03:17:14 2008 +0000
+++ b/libpurple/protocols/jabber/xdata.c	Thu Jun 19 03:17:41 2008 +0000
@@ -232,10 +232,6 @@
 		if(!label)
 			label = var;
 
-		if((valuenode = xmlnode_get_child(fn, "value")))
-			value = xmlnode_get_data(valuenode);
-
-
 		if(!strcmp(type, "text-private")) {
 			if((valuenode = xmlnode_get_child(fn, "value")))
 				value = xmlnode_get_data(valuenode);
@@ -333,14 +329,16 @@
 			g_hash_table_replace(data->fields, g_strdup(var), GINT_TO_POINTER(JABBER_X_DATA_BOOLEAN));
 
 			g_free(value);
-		} else if(!strcmp(type, "fixed") && value) {
+		} else if(!strcmp(type, "fixed")) {
 			if((valuenode = xmlnode_get_child(fn, "value")))
 				value = xmlnode_get_data(valuenode);
 
-			field = purple_request_field_label_new("", value);
-			purple_request_field_group_add_field(group, field);
+			if(value != NULL) {
+				field = purple_request_field_label_new("", value);
+				purple_request_field_group_add_field(group, field);
 
-			g_free(value);
+				g_free(value);
+			}
 		} else if(!strcmp(type, "hidden")) {
 			if((valuenode = xmlnode_get_child(fn, "value")))
 				value = xmlnode_get_data(valuenode);