Wed, 27 Aug 2008 09:52:21 +0000
Fixed account_toxmlnode() so that xmlnode funcctions are not called if we have nothing to put in them.
| libpurple/account.c | file | annotate | diff | comparison | revisions |
--- a/libpurple/account.c Wed Aug 27 09:47:09 2008 +0000 +++ b/libpurple/account.c Wed Aug 27 09:52:21 2008 +0000 @@ -415,9 +415,12 @@ } else { child = xmlnode_new_child(node, "password"); - xmlnode_set_attrib(child, "keyring_id", keyring_id); - xmlnode_set_attrib(child, "mode", mode); - xmlnode_insert_data(child, data, -1); + if (keyring_id != NULL) + xmlnode_set_attrib(child, "keyring_id", keyring_id); + if (mode != NULL) + xmlnode_set_attrib(child, "mode", mode); + if (data != NULL) + xmlnode_insert_data(child, data, -1); if (destroy != NULL) destroy(data);