changeset 23263:6c4db8059e91

merge of 'adc233c42c586b7fae877a688cd39532eaca23a0' and 'dff9129288f4ec49e17c74372f1f52405fdf94bf'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 01 Jun 2008 21:36:43 +0000
parents 9c79e86e6f2b (diff) 07aa8e4a262a (current diff)
children 2b997b690500
files
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/xdata.c	Sun Jun 01 21:34:50 2008 +0000
+++ b/libpurple/protocols/jabber/xdata.c	Sun Jun 01 21:36:43 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);