aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2009-08-12 23:43:45 +0800
committerWill Thompson <will.thompson@collabora.co.uk>2009-08-13 00:35:07 +0800
commit03480a1e9b3e6886bef8346c4b73d8dd93b8e238 (patch)
treefc7571b82fb2af098b2b99d407bb96315aec2c8c
parentdf40da35e0abb3446b83b7950805aa62718dfff4 (diff)
downloadgsoc2013-empathy-03480a1e9b3e6886bef8346c4b73d8dd93b8e238.tar
gsoc2013-empathy-03480a1e9b3e6886bef8346c4b73d8dd93b8e238.tar.gz
gsoc2013-empathy-03480a1e9b3e6886bef8346c4b73d8dd93b8e238.tar.bz2
gsoc2013-empathy-03480a1e9b3e6886bef8346c4b73d8dd93b8e238.tar.lz
gsoc2013-empathy-03480a1e9b3e6886bef8346c4b73d8dd93b8e238.tar.xz
gsoc2013-empathy-03480a1e9b3e6886bef8346c4b73d8dd93b8e238.tar.zst
gsoc2013-empathy-03480a1e9b3e6886bef8346c4b73d8dd93b8e238.zip
Don't leak a ref when updating notification bubble
This meant that if a notification bubble for a tab had ever been updated, closing the tab would not destroy the EmpathyChat, or indeed close the Channel. New messages would be logged, but not presented to the user. Reopening a tab to the same channel would work, but sending a message would assert. I'm pretty sure this fixes #588840.
-rw-r--r--src/empathy-chat-window.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 0f835bc39..fb5a5c796 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -946,7 +946,6 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window,
char *escaped;
const char *body;
GdkPixbuf *pixbuf;
- NotificationData *cb_data;
EmpathyChatWindowPriv *priv = GET_PRIV (window);
gboolean res;
@@ -960,10 +959,6 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window,
}
}
- cb_data = g_slice_new0 (NotificationData);
- cb_data->chat = g_object_ref (chat);
- cb_data->window = window;
-
sender = empathy_message_get_sender (message);
header = empathy_contact_get_name (sender);
body = empathy_message_get_body (message);
@@ -973,6 +968,11 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window,
notify_notification_update (priv->notification,
header, escaped, NULL);
} else {
+ NotificationData *cb_data = cb_data = g_slice_new0 (NotificationData);
+
+ cb_data->chat = g_object_ref (chat);
+ cb_data->window = window;
+
priv->notification = notify_notification_new (header, escaped, NULL, NULL);
notify_notification_set_timeout (priv->notification, NOTIFY_EXPIRES_DEFAULT);