changeset 29784:bae447e1fa96

Allow the "alt" property on a Bits of Binary object to be NULL (do not store it in the alt lookup hashtable). This will allow us to create data objects for temporary "one time" objects (such as file transfer thumbnails)
author Marcus Lundblad <ml@update.uu.se>
date Thu, 25 Jun 2009 20:56:37 +0000
parents afe5c224f3e9
children 51bc0be83108
files libpurple/protocols/jabber/data.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/data.c	Thu Jun 25 20:46:11 2009 +0000
+++ b/libpurple/protocols/jabber/data.c	Thu Jun 25 20:56:37 2009 +0000
@@ -185,7 +185,8 @@
 {
 	purple_debug_info("jabber", "associating local smiley\n alt = %s, cid = %s\n",
 		alt, jabber_data_get_cid(data));
-	g_hash_table_insert(local_data_by_alt, g_strdup(alt), data);
+	if (alt)
+		g_hash_table_insert(local_data_by_alt, g_strdup(alt), data);
 	g_hash_table_insert(local_data_by_cid, g_strdup(jabber_data_get_cid(data)),
 		data);
 }