diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2010-02-24 17:47:44 -0500 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2010-02-25 15:24:35 -0500 |
commit | 90f889a2a7091df1cc22e8653957e255cf69021f (patch) | |
tree | 480a89bf020a744719257f8e16de07cbfefc8584 /src | |
parent | 8486e8b712facf6188386b39e401c07da587a15c (diff) | |
download | telepathy-gabble-90f889a2a7091df1cc22e8653957e255cf69021f.tar.gz |
Use g_hash_table_steal () in conn-mail-notif.c
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/conn-mail-notif.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/conn-mail-notif.c b/src/conn-mail-notif.c index 8218666f4..7235a6041 100644 --- a/src/conn-mail-notif.c +++ b/src/conn-mail-notif.c @@ -398,14 +398,12 @@ mail_thread_info_each (WockyXmppNode *node, tid = g_strdup (val_str); if (data->old_mails != NULL) - mail = g_hash_table_lookup (data->old_mails, tid); - - if (mail != NULL) { - g_hash_table_ref (mail); - g_hash_table_remove (data->old_mails, tid); + mail = g_hash_table_lookup (data->old_mails, tid); + g_hash_table_steal (data->old_mails, tid); } - else + + if (mail == NULL) { mail = tp_asv_new ("id", G_TYPE_STRING, tid, "url-data", G_TYPE_STRING, "", |